mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Merge pull request #3834 from mvgorcum/develop
Remove build requirements after building docker image
This commit is contained in:
commit
037a06e8f0
1
changelog.d/3834.misc
Normal file
1
changelog.d/3834.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Improved Dockerfile to remove build requirements after building reducing the image size.
|
@ -1,6 +1,8 @@
|
|||||||
FROM docker.io/python:2-alpine3.8
|
FROM docker.io/python:2-alpine3.8
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual .nacl_deps \
|
COPY . /synapse
|
||||||
|
|
||||||
|
RUN apk add --no-cache --virtual .build_deps \
|
||||||
build-base \
|
build-base \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libjpeg-turbo-dev \
|
libjpeg-turbo-dev \
|
||||||
@ -8,13 +10,16 @@ RUN apk add --no-cache --virtual .nacl_deps \
|
|||||||
libxslt-dev \
|
libxslt-dev \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
su-exec \
|
zlib-dev \
|
||||||
zlib-dev
|
&& cd /synapse \
|
||||||
|
&& apk add --no-cache --virtual .runtime_deps \
|
||||||
COPY . /synapse
|
libffi \
|
||||||
|
libjpeg-turbo \
|
||||||
# A wheel cache may be provided in ./cache for faster build
|
libressl \
|
||||||
RUN cd /synapse \
|
libxslt \
|
||||||
|
libpq \
|
||||||
|
zlib \
|
||||||
|
su-exec \
|
||||||
&& pip install --upgrade \
|
&& pip install --upgrade \
|
||||||
lxml \
|
lxml \
|
||||||
pip \
|
pip \
|
||||||
@ -26,7 +31,8 @@ RUN cd /synapse \
|
|||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
setup.cfg \
|
setup.cfg \
|
||||||
setup.py \
|
setup.py \
|
||||||
synapse
|
synapse \
|
||||||
|
&& apk del .build_deps
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user