Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
037a06e8
Unverified
Commit
037a06e8
authored
6 years ago
by
Erik Johnston
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3834 from mvgorcum/develop
Remove build requirements after building docker image
parents
9a5ea511
af10fa65
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/3834.misc
+1
-0
1 addition, 0 deletions
changelog.d/3834.misc
docker/Dockerfile
+16
-10
16 additions, 10 deletions
docker/Dockerfile
with
17 additions
and
10 deletions
changelog.d/3834.misc
0 → 100644
+
1
−
0
View file @
037a06e8
Improved Dockerfile to remove build requirements after building reducing the image size.
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
16
−
10
View file @
037a06e8
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
\
libffi-dev
\
libjpeg-turbo-dev
\
...
...
@@ -8,13 +10,16 @@ RUN apk add --no-cache --virtual .nacl_deps \
libxslt-dev
\
linux-headers
\
postgresql-dev
\
su-exec
\
zlib-dev
COPY
. /synapse
# A wheel cache may be provided in ./cache for faster build
RUN
cd
/synapse
\
zlib-dev
\
&&
cd
/synapse
\
&&
apk add
--no-cache
--virtual
.runtime_deps
\
libffi
\
libjpeg-turbo
\
libressl
\
libxslt
\
libpq
\
zlib
\
su-exec
\
&&
pip
install
--upgrade
\
lxml
\
pip
\
...
...
@@ -26,8 +31,9 @@ RUN cd /synapse \
&&
rm
-rf
\
setup.cfg
\
setup.py
\
synapse
synapse
\
&&
apk del .build_deps
VOLUME
["/data"]
EXPOSE
8008/tcp 8448/tcp
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment