-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e38aa2
commit a965955
Showing
1 changed file
with
7 additions
and
11 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,26 +1,22 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM python:3.10.0-slim-bullseye | ||
ARG VARIANT=3.10-bullseye | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} | ||
|
||
ENV VIRTUAL_ENV=/opt/venv | ||
RUN python3 -m venv $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
ARG NODE_VERSION="16" | ||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
# system dependencies | ||
ENV NODE_VERSION=16.8.0 | ||
RUN apt update | ||
RUN apt install -y curl git gcc python3-dev | ||
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash | ||
ENV NVM_DIR=/root/.nvm | ||
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} | ||
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} | ||
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} | ||
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" | ||
|
||
# python dependencies | ||
COPY ./requirements.txt . | ||
COPY . . | ||
RUN pip install --upgrade pip setuptools wheel | ||
RUN pip install -r requirements.txt | ||
COPY requirements.txt /tmp/pip-tmp/ | ||
RUN pip --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ | ||
&& rm -rf /tmp/pip-tmp | ||
RUN pip install autopep8 | ||
RUN npm i -g nodemon |