-
Notifications
You must be signed in to change notification settings - Fork 30
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 #516 from pectum83/fix-devcontainer
Fix devcontainer
- Loading branch information
Showing
4 changed files
with
16 additions
and
40 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 |
---|---|---|
@@ -1,30 +1,21 @@ | ||
ARG VARIANT="3.10" | ||
ARG VARIANT="3.11" | ||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} as builder | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
WORKDIR /workspaces | ||
|
||
COPY Pipfile ./ | ||
|
||
# Create Python requirements files from pipenv (lockfile) | ||
RUN pip3 install -U pip \ | ||
&& pip3 install pipenv \ | ||
&& pipenv lock \ | ||
&& pipenv requirements > /tmp/requirements.txt \ | ||
&& pipenv requirements --dev > /tmp/requirements_dev.txt | ||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
|
||
COPY --from=builder /tmp/requirements.txt /tmp/ | ||
COPY --from=builder /tmp/requirements_dev.txt /tmp/ | ||
|
||
# Install Python dependencies from requirements | ||
RUN pip3 install -r /tmp/requirements.txt \ | ||
RUN pip3 install --upgrade pip \ | ||
&& pip3 install pdbpp \ | ||
&& pip3 install -r /tmp/requirements_dev.txt \ | ||
&& rm -rf /tmp/requirements.txt /tmp/requirements_dev.txt pyatmo/ | ||
&& pip3 install pre-commit \ | ||
&& pip3 install time-machine \ | ||
&& pip3 install pytest-cov | ||
|
||
# Remove any old pytest versions that might conflict | ||
RUN python3 -m pip install --upgrade --force-reinstall pytest \ | ||
&& rm -rf /usr/local/py-utils/venvs/pytest/bin/pytest | ||
|
||
# Set the default shell to bash instead of sh | ||
ENV SHELL /bin/bash | ||
ENV SHELL="/bin/bash" |
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
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
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