Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Mar 27, 2019
1 parent 0fa88ca commit 4ce5e20
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ If you want to create a new definition:

See [VS Code Remote's documentation](https://aka.ms/vscode-remote/docker) for information on the expected contents of `devContainer.json` and how it relates to other files listed above.

Note that any additional assets can be included as needed, but keep in mind that these will overlay on top of an existing project. Anything you don't want added to a project should be referenced in [glob](https://facelessuser.github.io/wcmatch/glob/) form in `.devcontainer/ignore` with paths relative to the location of the `ignore` file. Create a `README.md` in the folder with a brief description of the purpose of the container definition and any manual steps required to use it.
Note that any additional assets can be included as needed, but keep in mind that these will overlay on top of an existing project. Keeping these files in the `.devcontainer` should reduce the chances of something conflicting but note that any command that are run are relative to the root of the project, so you'll need to include `.devcontainer` in any path references.

Anything you don't want added to a project should be referenced in [glob](https://facelessuser.github.io/wcmatch/glob/) form in `.devcontainer/ignore` with paths relative to the root of the folder. Create a `README.md` in the folder with a brief description of the purpose of the container definition and any manual steps required to use it.

4. Commit your changes and submit a PR - we'll take a look at it, provide any needed feedback, and then merge it in! We appreciate any and all feedback!!

Expand All @@ -58,7 +60,7 @@ VS Code Remote provides a straight forward development loop for creating and edi

Note that if you make major changes, Docker may occasionally not pick up your edits. If this happens, you can delete the existing container and image, open the folder locally, and go to step 2 above. Install the [Docker extension](https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker) locally (when not in a container) to make this easy. While you can use Docker from inside a container by forwarding the Docker unix socket and installing the CLI in the container (see [Docker-in-Docker](containers/docker-in-docker)), you'll likely be removing the container you are actually using so this approach will not work well in this case.

Finally, after you get your container up and running, you can test it by adding test assets into the definition folder as long as they are referenced in the `.devcontainer/ignore` file in [glob](https://facelessuser.github.io/wcmatch/glob/) form ith paths relative to the location of the `ignore` file. By convention, most definitions place test assets in a `test-project` folder and this path is referenced in the template `ignore` files.
Finally, after you get your container up and running, you can test it by adding test assets into the definition folder as long as they are referenced in the `.devcontainer/ignore` file in [glob](https://facelessuser.github.io/wcmatch/glob/) form ith paths relative the root of the folder. By convention, most definitions place test assets in a `test-project` folder and this path is referenced in the template `ignore` files.

## Speeding up container provisioning

Expand Down
3 changes: 1 addition & 2 deletions containers/python-3-django/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ RUN pip install pylint
RUN mkdir /app
WORKDIR /app

ADD requirements.txt /app/
COPY .devcontainer/requirements.txt /app/
RUN pip install -r requirements.txt
ADD . /app/

# Install git
RUN apt-get update && apt-get -y install git
Expand Down
2 changes: 1 addition & 1 deletion containers/python-3-flask-redis/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM python:3-slim
RUN mkdir /app
WORKDIR /app

ADD requirements.txt /app/
COPY .devcontainer/requirements.txt /app/
RUN pip install -r requirements.txt

RUN pip install pylint
Expand Down
4 changes: 2 additions & 2 deletions containers/python-3-jupyter-pyspark/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ USER root
RUN pip install pylint

# Copy jupyter_notebook_config.py with token that matches settings
COPY jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py
COPY .devcontainer/jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py

# Copy default endpoint specific user settings overrides into container to specify Python path, token
COPY settings.vscode.json /home/jovyan/.vscode-remote/data/User/settings.json
COPY .devcontainer/settings.vscode.json /home/jovyan/.vscode-remote/data/User/settings.json

# Install git
RUN apt-get update && apt-get -y install git
Expand Down

0 comments on commit 4ce5e20

Please sign in to comment.