Dockerfile 843 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM ruby:2.4.1-alpine
  2. LABEL maintainer="https://github.com/tootsuite/mastodon" \
  3. description="A GNU Social-compatible microblogging server"
  4. ENV RAILS_ENV=production \
  5. NODE_ENV=production
  6. EXPOSE 3000 4000
  7. WORKDIR /mastodon
  8. COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
  9. RUN BUILD_DEPS=" \
  10. postgresql-dev \
  11. libxml2-dev \
  12. libxslt-dev \
  13. build-base" \
  14. && apk -U upgrade && apk add \
  15. $BUILD_DEPS \
  16. nodejs \
  17. libpq \
  18. libxml2 \
  19. libxslt \
  20. ffmpeg \
  21. file \
  22. imagemagick \
  23. && npm install -g npm@3 && npm install -g yarn \
  24. && bundle install --deployment --without test development \
  25. && yarn \
  26. && yarn cache clean \
  27. && npm -g cache clean \
  28. && apk del $BUILD_DEPS \
  29. && rm -rf /tmp/* /var/cache/apk/*
  30. COPY . /mastodon
  31. VOLUME /mastodon/public/system /mastodon/public/assets