mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 15:23:27 +08:00
Fixed docker builds
This commit is contained in:
parent
4451e6af33
commit
be82600fe6
1 changed files with 18 additions and 6 deletions
24
Dockerfile
24
Dockerfile
|
@ -5,12 +5,24 @@ COPY ./static/package*.json /code/static/
|
||||||
RUN cd /code/static && npm install
|
RUN cd /code/static && npm install
|
||||||
|
|
||||||
# Main image
|
# Main image
|
||||||
FROM python:3.7-alpine
|
FROM python:3.7-slim
|
||||||
|
|
||||||
|
# Keeps Python from generating .pyc files in the container
|
||||||
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
|
# Turns off buffering for easier container logging
|
||||||
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
|
# Install and setup poetry
|
||||||
|
RUN pip install -U pip \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt install -y curl netcat gcc python3-dev \
|
||||||
|
&& curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
||||||
|
# Clear apt cache
|
||||||
|
# && apt-get clean \
|
||||||
|
# && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ENV PATH="${PATH}:/root/.poetry/bin"
|
||||||
|
|
||||||
# install poetry
|
|
||||||
RUN apk update \
|
|
||||||
&& apk add --no-cache build-base openssl-dev libffi-dev \
|
|
||||||
&& pip3 install poetry
|
|
||||||
|
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
|
||||||
|
@ -18,7 +30,7 @@ WORKDIR /code
|
||||||
COPY poetry.lock pyproject.toml ./
|
COPY poetry.lock pyproject.toml ./
|
||||||
|
|
||||||
RUN poetry config virtualenvs.create false \
|
RUN poetry config virtualenvs.create false \
|
||||||
&& poetry install --no-root
|
&& 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