Add prod container setup

This commit is contained in:
Gene Liverman 2021-12-08 16:56:17 -05:00
parent a48afb14eb
commit e12d470415
No known key found for this signature in database
GPG key ID: 3AF83985B6C857C6
9 changed files with 271 additions and 6 deletions

View file

@ -0,0 +1,34 @@
# Run vmpooler in a Docker container! Configuration can either be embedded
# and built within the current working directory, or stored in a
# VMPOOLER_CONFIG environment value and passed to the Docker daemon.
#
# BUILD:
# docker build -t vmpooler .
#
# RUN:
# docker run -e VMPOOLER_CONFIG -p 80:4567 -it vmpooler
FROM jruby:9.2-jdk
ENV RACK_ENV=production
ENV LOGFILE=/dev/stdout \
RACK_ENV=production
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends make && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
COPY ./docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
COPY ./Gemfile* ./
RUN gem install bundler && \
bundle config set --local jobs 3 && \
bundle install
ENTRYPOINT ["docker-entrypoint.sh"]