anchor.diff:      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 \
  + && 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 --deployment --without test development \
    && yarn --ignore-optional --pure-lockfile
   
   COPY . /mastodon
  
positive.code:     imagemagick@edge \
      libidn \
      libpq \
      libxml2 \
      libxslt \
      nodejs-npm@edge \
      nodejs@edge \
      protobuf \
  
negative.code: 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
  
  