Make setup use the base image

main
Florent Daigniere 2 years ago
parent 68bb8da2b7
commit 86637f0259

@ -10,5 +10,5 @@ RUN echo $VERSION >/version
HEALTHCHECK CMD true HEALTHCHECK CMD true
USER app USER mailu
CMD ["/bin/bash", "-c", "sleep infinity"] CMD ["/bin/bash", "-c", "sleep infinity"]

@ -1,24 +1,20 @@
ARG DISTRO=alpine:3.14.5 # syntax=docker/dockerfile-upstream:1.4.3
FROM $DISTRO
ARG VERSION # setup image
ENV TZ Etc/UTC FROM base
ARG VERSION=local
LABEL version=$VERSION LABEL version=$VERSION
RUN mkdir -p /app
WORKDIR /app
COPY requirements.txt requirements.txt
RUN apk add --no-cache curl python3 py3-pip \
&& pip3 install -r requirements.txt
COPY server.py ./server.py
COPY main.py ./main.py
COPY flavors /data/flavors COPY flavors /data/flavors
COPY templates /data/templates COPY templates /data/templates
COPY static ./static COPY static ./static
COPY server.py ./server.py
COPY main.py ./main.py
RUN echo $VERSION >> /version
EXPOSE 80/tcp EXPOSE 80/tcp
HEALTHCHECK --start-period=350s CMD curl -skfLo /dev/null http://localhost/
CMD gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload main:app CMD gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload main:app
RUN echo $VERSION >> /version

@ -1,12 +0,0 @@
Flask==1.0.2
Flask-Bootstrap==3.3.7.1
gunicorn==19.9.0
redis==3.2.1
Jinja2==3.0.3
MarkupSafe==2.1.0
Werkzeug==2.0.3
click==8.0.3
dominate==2.6.0
itsdangerous==2.0.1
redis==3.2.1
visitor==0.1.3

@ -107,6 +107,9 @@ target "docs" {
target "setup" { target "setup" {
inherits = ["defaults"] inherits = ["defaults"]
context = "setup/" context = "setup/"
contexts = {
base = "target:base"
}
tags = tag("setup") tags = tag("setup")
} }

Loading…
Cancel
Save