From ae78d012acfd245228815f4e404f0cfa15c97f55 Mon Sep 17 00:00:00 2001 From: Wonderfall Date: Sat, 20 May 2017 20:01:05 +0200 Subject: Some Dockerfile improvements (#3182) - improve docker_entrypoint.sh - serve static files with puma by default - sort packages list - use virtual package for build deps - show how to assign UID/GID --- Dockerfile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 3248dd9d1..7033cddd4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ LABEL maintainer="https://github.com/tootsuite/mastodon" \ description="A GNU Social-compatible microblogging server" ENV UID=991 GID=991 \ + RAILS_SERVE_STATIC_FILES=true \ RAILS_ENV=production NODE_ENV=production EXPOSE 3000 4000 @@ -11,28 +12,28 @@ EXPOSE 3000 4000 WORKDIR /mastodon RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ - && BUILD_DEPS=" \ - postgresql-dev \ + && apk -U upgrade \ + && apk add -t build-dependencies \ + build-base \ libxml2-dev \ libxslt-dev \ + postgresql-dev \ + protobuf-dev \ python \ - build-base \ - protobuf-dev" \ - && apk -U upgrade && apk add \ - $BUILD_DEPS \ - nodejs@edge \ - nodejs-npm@edge \ + && apk add \ + ca-certificates \ + ffmpeg \ + file \ git \ + imagemagick@edge \ libpq \ libxml2 \ libxslt \ - ffmpeg \ - file \ - imagemagick@edge \ - ca-certificates \ + nodejs-npm@edge \ + nodejs@edge \ protobuf \ - tini \ su-exec \ + tini \ && npm install -g npm@3 && npm install -g yarn \ && update-ca-certificates \ && rm -rf /tmp/* /var/cache/apk/* -- cgit