Dockerfile 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
  9. && BUILD_DEPS=" \
  10. postgresql-dev \
  11. libxml2-dev \
  12. libxslt-dev \
  13. python \
  14. build-base" \
  15. && apk -U upgrade && apk add \
  16. $BUILD_DEPS \
  17. nodejs@edge \
  18. nodejs-npm@edge \
  19. git \
  20. libpq \
  21. libxml2 \
  22. libxslt \
  23. ffmpeg \
  24. file \
  25. imagemagick@edge \
  26. ca-certificates \
  27. && npm install -g npm@3 && npm install -g yarn \
  28. && update-ca-certificates \
  29. && rm -rf /tmp/* /var/cache/apk/*
  30. COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
  31. RUN bundle install --deployment --without test development \
  32. && yarn --ignore-optional --pure-lockfile
  33. COPY . /mastodon
  34. VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs