1
0
mirror of https://github.com/daniviga/bite.git synced 2024-11-23 05:16:13 +01:00

Better layering for Docker image

This commit is contained in:
Daniele Viganò 2020-06-26 22:03:30 +02:00
parent 165ae3d3c0
commit c5418c0734
Signed by: dani
GPG Key ID: DB49AFC03C40EE02

View File

@ -31,11 +31,11 @@ RUN apk update && apk add --no-cache postgresql-libs \
&& wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-alpine-linux-amd64-v0.6.1.tar.gz -qO- \ && wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-alpine-linux-amd64-v0.6.1.tar.gz -qO- \
| tar -xz -C /usr/local/bin | tar -xz -C /usr/local/bin
COPY --from=builder /usr/local/lib/python3.8/site-packages/ /usr/local/lib/python3.8/site-packages/ COPY --from=builder /usr/local/lib/python3.8/site-packages/ /usr/local/lib/python3.8/site-packages/
COPY --chown=1000:1000 bite /srv/app/bite
COPY --chown=1000:1000 requirements.txt /srv/app/bite/requirements.txt COPY --chown=1000:1000 requirements.txt /srv/app/bite/requirements.txt
RUN pip3 install -r /srv/app/bite/requirements.txt
RUN pip3 install -r /srv/app/bite/requirements.txt \ COPY --chown=1000:1000 bite /srv/app/bite
&& python3 -m compileall -q /srv/app/bite \ RUN python3 -m compileall -q /srv/app/bite \
&& mkdir -p /srv/appdata/bite/static \ && mkdir -p /srv/appdata/bite/static \
&& chown -R 1000:1000 /srv/appdata/bite && chown -R 1000:1000 /srv/appdata/bite