Skip to content

Commit

Permalink
Optimize Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
lcjqyml committed Sep 19, 2023
1 parent 819fac0 commit 1d0242c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM python:3
FROM python:3.11
WORKDIR /app
ARG POETRY_VERSION=1.2.2
RUN apt-get update && \
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash - && \
. /root/.bashrc && nvm install 16.20 && \
rm -rf /var/cache/apk/* && \
pip3 install --no-cache-dir poetry && \
rm -rf ~/.cache/
Expand All @@ -12,6 +12,6 @@ COPY pyproject.toml ./
COPY poetry.lock ./
# Install dependencies
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
RUN poetry install && npm install && rm -rf ~/.npm/
RUN . /root/.bashrc && poetry install && npm install && rm -rf ~/.npm/
COPY . .
CMD ["npm", "run", "dev"]
CMD . /root/.bashrc && npm run dev

0 comments on commit 1d0242c

Please sign in to comment.