Consolidate dockerfiles and add docs for development

This will reduce the number of files that need to be managed and dependencies that need updated at the same time.
This commit is contained in:
Jake Spain 2023-01-23 17:15:18 -05:00
parent 3a771dfadd
commit 71b4edcd1d
No known key found for this signature in database
GPG key ID: BC1C4DA0A085E113
35 changed files with 386 additions and 627 deletions

43
docker/Dockerfile.local Normal file
View file

@ -0,0 +1,43 @@
# For local development of vmpooler core and provider gems instead of using a
# git source ensure the following directory structure:
# |-- vmpooler-projects
# | |--vmpooler-deployment
# | |--vmpooler-provider-ec2
# | |--vmpooler-provider-gce
# | |--vmpooler-provider-vsphere
#
# Then change directory into vmpooler-projects and build with:
FROM amd64/jruby:9.3.6-jdk
LABEL org.opencontainers.image.description "VMPooler plus all known providers"
ENV DEBIAN_FRONTEND=noninteractive
ENV LOGFILE=/dev/stdout
ENV RACK_ENV=production
RUN apt-get update -qq && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends make git netbase && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
COPY vmpooler /opt/vmpooler
COPY vmpooler-provider-ec2 /opt/vmpooler-provider-ec2
COPY vmpooler-provider-gce /opt/vmpooler-provider-gce
COPY vmpooler-provider-vsphere /opt/vmpooler-provider-vsphere
RUN gem install bundler
COPY vmpooler-deployment/docker/docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
COPY vmpooler-deployment/docker/Gemfile.local ./Gemfile
RUN bundle config set --local jobs 3 && \
bundle install
ENTRYPOINT ["docker-entrypoint.sh"]