diff options
author | David Phillips <david@yeah.nah.nz> | 2020-05-20 22:51:13 +1200 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2020-05-20 22:51:13 +1200 |
commit | f5bd4f56aaf487e6f113111bbe3d6546cac9d626 (patch) | |
tree | d2e3cc6cf4c27854c8c720a4592d6be18d98be51 /docker/Dockerfile | |
parent | 8b34d23cb10f1f5aa5de4ba04bacf92b6160075e (diff) | |
download | idalius-f5bd4f56aaf487e6f113111bbe3d6546cac9d626.tar.xz |
Collapse dockerfile commands
This reduces the image size from ~200 MB to ~72 MB.
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r-- | docker/Dockerfile | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index e33f78c..500d622 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,21 +6,12 @@ ARG gid=1000 RUN addgroup -g $gid idalius RUN adduser -u $uid -D -G idalius idalius -# Intermediate tools used to build perl modules not provided as apk -RUN apk add perl perl-dev perl-app-cpanminus make gcc libgcc wget musl-dev openssl openssl-dev zlib-dev - -# Perl modules used by idalius -RUN apk add perl-config-tiny perl-html-parser perl-datetime perl-io-socket-ssl - -# Build and install POE and POE::Component::IRC modules -RUN cpanm install POE POE::Component::IRC -RUN cpanm install -n POE::Component::SSLify - -# Remove non-runtime deps -RUN apk del perl-dev perl-app-cpanminus make gcc libgcc wget musl-dev - -# Remove unneeded caches etc -RUN rm -rf /root/.cpanm /var/cache/apk/* +RUN apk add --no-cache perl perl-dev perl-app-cpanminus make gcc libgcc wget musl-dev openssl openssl-dev zlib-dev && \ + apk add --no-cache perl-config-tiny perl-html-parser perl-datetime perl-io-socket-ssl && \ + cpanm install POE POE::Component::IRC && \ + cpanm install -n POE::Component::SSLify && \ + apk del --no-cache perl-dev perl-app-cpanminus make gcc libgcc wget musl-dev openssl-dev zlib-dev && \ + rm -rf /root/.cpanm /var/cache/apk/* USER idalius |