Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add docs for Codespaces #52

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,43 @@

[![Install](https://i.imgur.com/1NJHIbH.gif)](https://github.com/qdm12/latexdevcontainer#setup-for-a-project)

### Run inside GitHub Codespaces

Remember, if you are running this devcontainer inside a GitHub Codespace, you have to uncomment the following
line from `.devcontainer/docker-compose.yml`:

```diff
qdm12 marked this conversation as resolved.
Show resolved Hide resolved
version: "3.2"

services:
vscode:
build: .
image: latexdevcontainer
volumes:
- ../:/workspace
# Docker socket to access Docker server
- /var/run/docker.sock:/var/run/docker.sock
Comment on lines +76 to +77
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this one be commented as well for codespaces?

# SSH directory
- - ~/.ssh:/root/.ssh
+ # - ~/.ssh:/root/.ssh
# For Windows without WSL, a copy will be made
# from /tmp/.ssh to ~/.ssh to fix permissions
- - ~/.ssh:/tmp/.ssh:ro
+ # - ~/.ssh:/tmp/.ssh:ro
# Shell history persistence
- - ~/.zsh_history:/root/.zsh_history:z
+ # - ~/.zsh_history:/root/.zsh_history:z
# Git config
- - ~/.gitconfig:/root/.gitconfig
+ # - ~/.gitconfig:/root/.gitconfig
Comment on lines +79 to +90
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually thinking more about this, should we flip this around?

Comment them in .devcontainer/docker-compose.yml and not have this section in the readme?
That would make more sense I think.

I'll see what I can do with https://github.com/qdm12/devtainr as well so it can uncomment those fields when setting up a repo 😉 Created qdm12/devtainr#68

environment:
- TZ=
entrypoint: ["zsh", "-c", "while sleep 1000; do :; done"]
```

You have to do this because inside a Codespace there are no files like `~/.ssh:/root/.ssh`
or `~/.zsh_history`

## Install LaTex packages

If you need for example the package `lastpage`, open the integrated terminal in VS Code, select `zsh` and enter:
Expand Down