mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Add docker-compose and dockerfile to support it
This commit adds a docker-compose file and a dockerfile to build vmpooler and install it from source.
This commit is contained in:
parent
5e39bc2755
commit
8bddb4f854
2 changed files with 52 additions and 0 deletions
21
docker/Dockerfile_local
Normal file
21
docker/Dockerfile_local
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# 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.1-jdk
|
||||||
|
|
||||||
|
COPY docker/docker-entrypoint.sh /usr/local/bin/
|
||||||
|
COPY ./ ./
|
||||||
|
|
||||||
|
ENV RACK_ENV=production
|
||||||
|
|
||||||
|
RUN bundle && gem build vmpooler.gemspec && gem install vmpooler*.gem && \
|
||||||
|
chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
31
docker/docker-compose.yml
Normal file
31
docker/docker-compose.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
# For local development run with a dummy provider
|
||||||
|
version: '3.2'
|
||||||
|
services:
|
||||||
|
vmpooler:
|
||||||
|
build:
|
||||||
|
context: ../
|
||||||
|
dockerfile: docker/Dockerfile_local
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: ${PWD}/vmpooler.yaml
|
||||||
|
target: /etc/vmpooler/vmpooler.yaml
|
||||||
|
ports:
|
||||||
|
- "4567:4567"
|
||||||
|
networks:
|
||||||
|
- redis-net
|
||||||
|
environment:
|
||||||
|
- VMPOOLER_DEBUG=true # for use of dummy auth
|
||||||
|
- VMPOOLER_CONFIG_FILE=/etc/vmpooler/vmpooler.yaml
|
||||||
|
- REDIS_SERVER=redis
|
||||||
|
image: vmpooler-local
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
|
networks:
|
||||||
|
- redis-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
redis-net:
|
||||||
Loading…
Add table
Add a link
Reference in a new issue