about summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
authorWonderfall <wonderfall@targaryen.house>2017-05-20 20:01:05 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-05-20 20:01:05 +0200
commitae78d012acfd245228815f4e404f0cfa15c97f55 (patch)
tree136df3de7d200b251012ed27b7a17803484d137e /Dockerfile
parentef900789bc99d3bb3cad3b664c7dd5b9bcd1a20c (diff)
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
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 14 insertions, 13 deletions
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/*