]> cat aescling's git repositories - mastodon.git/blob - Dockerfile
Update Yarn to version 1.1.0 (#5125)
[mastodon.git] / Dockerfile
1 FROM ruby:2.4.2-alpine3.6
2
3 LABEL maintainer="https://github.com/tootsuite/mastodon" \
4 description="A GNU Social-compatible microblogging server"
5
6 ENV UID=991 GID=991 \
7 RAILS_SERVE_STATIC_FILES=true \
8 RAILS_ENV=production NODE_ENV=production
9
10 ARG YARN_VERSION=1.1.0
11 ARG YARN_DOWNLOAD_SHA256=171c1f9ee93c488c0d774ac6e9c72649047c3f896277d88d0f805266519430f3
12 ARG LIBICONV_VERSION=1.15
13 ARG LIBICONV_DOWNLOAD_SHA256=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
14
15 EXPOSE 3000 4000
16
17 WORKDIR /mastodon
18
19 RUN apk -U upgrade \
20 && apk add -t build-dependencies \
21 build-base \
22 icu-dev \
23 libidn-dev \
24 libressl \
25 libtool \
26 postgresql-dev \
27 protobuf-dev \
28 python \
29 && apk add \
30 ca-certificates \
31 ffmpeg \
32 file \
33 git \
34 icu-libs \
35 imagemagick \
36 libidn \
37 libpq \
38 nodejs \
39 nodejs-npm \
40 protobuf \
41 su-exec \
42 tini \
43 && update-ca-certificates \
44 && mkdir -p /tmp/src /opt \
45 && wget -O yarn.tar.gz "https://github.com/yarnpkg/yarn/releases/download/v$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
46 && echo "$YARN_DOWNLOAD_SHA256 *yarn.tar.gz" | sha256sum -c - \
47 && tar -xzf yarn.tar.gz -C /tmp/src \
48 && rm yarn.tar.gz \
49 && mv /tmp/src/yarn-v$YARN_VERSION /opt/yarn \
50 && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
51 && wget -O libiconv.tar.gz "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz" \
52 && echo "$LIBICONV_DOWNLOAD_SHA256 *libiconv.tar.gz" | sha256sum -c - \
53 && tar -xzf libiconv.tar.gz -C /tmp/src \
54 && rm libiconv.tar.gz \
55 && cd /tmp/src/libiconv-$LIBICONV_VERSION \
56 && ./configure --prefix=/usr/local \
57 && make -j$(getconf _NPROCESSORS_ONLN)\
58 && make install \
59 && libtool --finish /usr/local/lib \
60 && cd /mastodon \
61 && rm -rf /tmp/* /var/cache/apk/*
62
63 COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
64
65 RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
66 && bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without test development \
67 && yarn --pure-lockfile
68
69 COPY . /mastodon
70
71 COPY docker_entrypoint.sh /usr/local/bin/run
72
73 RUN chmod +x /usr/local/bin/run
74
75 VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs
76
77 ENTRYPOINT ["/usr/local/bin/run"]
This page took 0.053198 seconds and 4 git commands to generate.