Files
danbooru/config/docker/danbooru-ci
evazion 059e061b15 tests: fixup comment vote, post controller tests.
Use git clean to delete stale files from an earlier checkout. These
files interfered with various things (specifically, a comment vote test
failed because there was an old comment_votes/create.json.erb template
hanging around that changed the behavior of the POST /comment_votes endpoint).
2019-09-09 15:06:24 -05:00

31 lines
1.0 KiB
Plaintext

# This sets up a docker container suitable for use with Travis CI
FROM r888888888/danbooru-base
ENV PATH $PATH:/usr/local/bin
# Work around a bug in the ruby:2.5.1-slim-stretch base image. The base image
# sets BUNDLER_VERSION=1.16.4, which forces `bundle install` to use an outdated
# version even when we install a newer version. Remove this after updating the
# base image.
#
# https://discuss.circleci.com/t/using-bundler-2-0-during-ci-fails/27411
# https://github.com/bundler/bundler/issues/6782
# https://github.com/docker-library/ruby/issues/246
ENV BUNDLER_VERSION 2.0.2
USER root
COPY . /app
RUN chown -R danbooru:danbooru /app
# install circleci cli tools
RUN curl -q -o /usr/local/bin/circleci https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci
RUN chmod +x /usr/local/bin/circleci
RUN sed -i'' -e 's/run -it/run -i/' /usr/local/bin/circleci
USER danbooru
RUN git reset --hard master
RUN git clean --force
RUN gem install bundler --version $BUNDLER_VERSION
RUN bundle install > /dev/null