diff options
author | Ondřej Hruška <ondra@ondrovo.com> | 2017-08-07 22:43:52 +0200 |
---|---|---|
committer | Ondřej Hruška <ondra@ondrovo.com> | 2017-08-07 22:43:52 +0200 |
commit | 7a1ca8b0df9d82a1e6ac4943a2d5562f93eab69f (patch) | |
tree | 36fbf6f3d2019cc345d33fe555569ec750a66957 /Dockerfile | |
parent | b8791ae79be7a9b7c0e541928b2741e40bbdc8a5 (diff) | |
parent | a3e53bd442752f210db2025f2dfc45e7599354c2 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile index ef139dcec..398628a48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,9 @@ ENV UID=991 GID=991 \ RAILS_SERVE_STATIC_FILES=true \ RAILS_ENV=production NODE_ENV=production +ARG LIBICONV_VERSION=1.15 +ARG LIBICONV_DOWNLOAD_SHA256=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 + EXPOSE 3000 4000 WORKDIR /mastodon @@ -18,8 +21,7 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit build-base \ icu-dev \ libidn-dev \ - libxml2-dev \ - libxslt-dev \ + libtool \ postgresql-dev \ protobuf-dev \ python \ @@ -32,8 +34,6 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit imagemagick@edge \ libidn \ libpq \ - libxml2 \ - libxslt \ nodejs-npm@edge \ nodejs@edge \ protobuf \ @@ -41,11 +41,23 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit tini \ yarn@edge \ && update-ca-certificates \ + && wget -O libiconv.tar.gz "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz" \ + && echo "$LIBICONV_DOWNLOAD_SHA256 *libiconv.tar.gz" | sha256sum -c - \ + && mkdir -p /tmp/src \ + && tar -xzf libiconv.tar.gz -C /tmp/src \ + && rm libiconv.tar.gz \ + && cd /tmp/src/libiconv-$LIBICONV_VERSION \ + && ./configure --prefix=/usr/local \ + && make -j$(getconf _NPROCESSORS_ONLN)\ + && make install \ + && libtool --finish /usr/local/lib \ + && cd /mastodon \ && rm -rf /tmp/* /var/cache/apk/* COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/ -RUN bundle install --deployment --without test development \ +RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \ + && bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without test development \ && yarn --ignore-optional --pure-lockfile COPY . /mastodon |