-
Notifications
You must be signed in to change notification settings - Fork 1
Devcontainer fixes #117
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
Devcontainer fixes #117
Changes from all commits
5a0066c
af6c2f7
b0ca8c2
760f883
a8d313a
1a07205
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,13 +13,18 @@ RUN apt-get update -y && apt-get install -y \ | |
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Create the venv folder and set permissions for anyone to modify---this is necessary to be able to break out the venv folder as a separate docker volume for better performance on Windows hosts | ||
| # Create the workspace folders that have docker volume (see docker-compose.yaml) and set permissions for anyone to modify | ||
| # this is necessary to be able to break out these folders as a separate docker volume for better performance on Windows hosts | ||
| ARG REPO_NAME=copier-base-template | ||
| ENV VENV_PATH=/workspaces/${REPO_NAME}/.venv | ||
| ENV VENV_PATH=/workspaces/${REPO_NAME}/backend/.venv | ||
| ENV PNPM_STORE=/workspaces/${REPO_NAME}/.pnpm-store | ||
| ENV FRONTEND_NODE_MODULES=/workspaces/${REPO_NAME}/frontend/node_modules | ||
|
Comment on lines
+19
to
+21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have several copier templates that have venv/node_modules that are not in the repo root. at some point (not saying now) we should probably move this into copier-base template and make a copier task in the sub-template that just adjusts the paths. the task could be defined in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created this fwiw LabAutomationAndScreening/copier-base-template#127 |
||
| RUN mkdir -p /workspaces && \ | ||
| mkdir -p ${VENV_PATH} && \ | ||
| chmod -R 777 /workspaces ${VENV_PATH} && \ | ||
| chgrp -R 0 /workspaces ${VENV_PATH} | ||
| mkdir -p ${PNPM_STORE} && \ | ||
| mkdir -p ${FRONTEND_NODE_MODULES} && \ | ||
| chmod -R 777 /workspaces ${VENV_PATH} ${PNPM_STORE} ${FRONTEND_NODE_MODULES} && \ | ||
| chgrp -R 0 /workspaces ${VENV_PATH} ${PNPM_STORE} ${FRONTEND_NODE_MODULES} | ||
|
|
||
| # SSH | ||
| EXPOSE 2222 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,12 @@ | |
| "service": "devcontainer", | ||
| "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
| "features": {{% endraw %}{% if is_child_of_copier_base_template is not defined %}{% raw %} | ||
| "ghcr.io/devcontainers/features/git-lfs:1.2.5": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this be a change in the base template?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you wanna just add a note to yourself, and not make the change now, that's fine. I just don't want to forget
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably worthwhile to put at that level too. Since figuring it out i haven't gone back and tried to use other non "python/nuxt project" based things as a devcontainer. So i wouldn't be surprised if its broken there.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. merged and updated this branch. :beg: for another approval please |
||
| // we are not using git-lfs right now, but its a transitive dep elsewhere. We want to configure auto pull to off since the feature will by default also try to install the git hook | ||
| // and it breaks creation of the devcontainer since pre-commit hooks are already in place. Probably a better way to fix this but until we use git-lfs we can leave it like this. | ||
| // https://github.com/devcontainers/features/blob/main/src/git-lfs/README.md | ||
| "autoPull": false | ||
| }, | ||
| "ghcr.io/devcontainers/features/aws-cli:1.1.2": { | ||
| // https://github.com/devcontainers/features/blob/main/src/aws-cli/devcontainer-feature.json | ||
| // view latest version https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you running your devcontainers inside WSL? maybe that explains some of the differences in behaviors we've observed. my files are on my regular windows hard drive. I know it's better to have them in the WSL "hard drive", but I haven't had a chance to figure that out yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes using WSL "hard drive"