-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from khiron/devcontainer
fixes Create .devcontainer #72
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "cogent3.org", | ||
"dockerFile": "../Dockerfile", | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/zsh" | ||
}, | ||
"runArgs": [ | ||
"-v", | ||
"/run/host-services/ssh-auth.sock:/ssh-auth.sock", | ||
"-e", | ||
"SSH_AUTH_SOCK=/ssh-auth.sock" | ||
], | ||
"postCreateCommand": "python -m venv c3org && echo 'source c3org/bin/activate' >> ~/.zshrc", | ||
"extensions": ["ms-python.python"], | ||
"workspaceFolder": "/cogent3.github.io", | ||
"mounts": ["source=${localWorkspaceFolder},target=/cogent3.github.io,type=bind,consistency=cached"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM python:3.11-slim-buster | ||
|
||
# Install any needed packages | ||
RUN apt-get update && apt-get install -y \ | ||
zsh \ | ||
curl \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Oh My Zsh | ||
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | ||
|
||
# Make zsh the default shell | ||
SHELL ["/bin/zsh", "-c"] | ||
|
||
# Create the /cogent3.github.io directory | ||
RUN mkdir -p /cogent3.github.io | ||
|
||
# Set the working directory in the container to /cogent3.github.io | ||
WORKDIR /cogent3.github.io | ||
|
||
# Create a Python virtual environment outside of the workspace folder | ||
RUN python -m venv /c3org | ||
|
||
# Copy the requirements.txt file into the Docker image | ||
COPY requirements.txt /cogent3.github.io/requirements.txt | ||
|
||
#Update pip in the virtual environment | ||
RUN /c3org/bin/python -m pip install --upgrade pip | ||
|
||
# Install any needed packages specified in requirements.txt into the virtual environment | ||
RUN /c3org/bin/pip install --no-cache-dir -r /cogent3.github.io/requirements.txt | ||
|
||
# Activate the virtual environment when a new shell is started | ||
RUN echo 'source /c3org/bin/activate' >> ~/.zshrc |
Binary file not shown.