mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 23:34:05 +08:00
Added apt folder cleaning
This commit is contained in:
parent
be82600fe6
commit
4e5ca3b30b
1 changed files with 16 additions and 14 deletions
30
Dockerfile
30
Dockerfile
|
@ -12,25 +12,27 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
# Turns off buffering for easier container logging
|
# Turns off buffering for easier container logging
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
|
# Add poetry to PATH
|
||||||
|
ENV PATH="${PATH}:/root/.poetry/bin"
|
||||||
|
|
||||||
|
WORKDIR /code
|
||||||
|
|
||||||
|
# Copy poetry files
|
||||||
|
COPY poetry.lock pyproject.toml ./
|
||||||
|
|
||||||
# Install and setup poetry
|
# Install and setup poetry
|
||||||
RUN pip install -U pip \
|
RUN pip install -U pip \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt install -y curl netcat gcc python3-dev \
|
&& apt install -y curl netcat gcc python3-dev \
|
||||||
&& curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
&& curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - \
|
||||||
|
# Remove curl and netcat from the image
|
||||||
|
&& apt-get purge -y curl netcat \
|
||||||
|
# Run poetry
|
||||||
|
&& poetry config virtualenvs.create false \
|
||||||
|
&& poetry install --no-interaction --no-ansi --no-root \
|
||||||
# Clear apt cache
|
# Clear apt cache
|
||||||
# && apt-get clean \
|
&& apt-get clean \
|
||||||
# && rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV PATH="${PATH}:/root/.poetry/bin"
|
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /code
|
|
||||||
|
|
||||||
# install dependencies
|
|
||||||
COPY poetry.lock pyproject.toml ./
|
|
||||||
|
|
||||||
RUN poetry config virtualenvs.create false \
|
|
||||||
&& poetry install --no-interaction --no-ansi --no-root
|
|
||||||
|
|
||||||
# copy npm packages
|
# copy npm packages
|
||||||
COPY --from=npm /code /code
|
COPY --from=npm /code /code
|
||||||
|
|
Loading…
Reference in a new issue