mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Add dockerfile without redis
This commit adds a dockerfile to install vmpooler without a local redis installation. Without this change the dockerfile provided assumes a local redis instance will be running. The dockerfile with redis is retained as 'Dockerfile-aio'. Additionally, the directory '/var/log/vmpooler' is no longer created since vmpooler uses '/var/log/vmpooler.log'.
This commit is contained in:
parent
67d5ef73c2
commit
9b8b35395d
2 changed files with 34 additions and 6 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
FROM jruby:9.1-jdk
|
FROM jruby:9.1-jdk
|
||||||
|
|
||||||
RUN mkdir -p /var/lib/vmpooler && mkdir /var/log/vmpooler
|
RUN mkdir -p /var/lib/vmpooler
|
||||||
|
|
||||||
WORKDIR /var/lib/vmpooler
|
WORKDIR /var/lib/vmpooler
|
||||||
|
|
||||||
|
|
@ -19,14 +19,10 @@ RUN bundle install --system
|
||||||
|
|
||||||
RUN ln -s /opt/jruby/bin/jruby /usr/bin/jruby
|
RUN ln -s /opt/jruby/bin/jruby /usr/bin/jruby
|
||||||
|
|
||||||
RUN echo "deb http://httpredir.debian.org/debian jessie main" >/etc/apt/sources.list.d/jessie-main.list
|
|
||||||
RUN apt-get update && apt-get install -y redis-server && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
COPY . /var/lib/vmpooler
|
COPY . /var/lib/vmpooler
|
||||||
|
|
||||||
ENV VMPOOLER_LOG /var/log/vmpooler.log
|
ENV VMPOOLER_LOG /var/log/vmpooler.log
|
||||||
CMD \
|
CMD \
|
||||||
/etc/init.d/redis-server start \
|
/var/lib/vmpooler/scripts/vmpooler_init.sh start \
|
||||||
&& /var/lib/vmpooler/scripts/vmpooler_init.sh start \
|
|
||||||
&& while [ ! -f ${VMPOOLER_LOG} ]; do sleep 1; done ; \
|
&& while [ ! -f ${VMPOOLER_LOG} ]; do sleep 1; done ; \
|
||||||
tail -f ${VMPOOLER_LOG}
|
tail -f ${VMPOOLER_LOG}
|
||||||
|
|
|
||||||
32
Dockerfile-aio
Normal file
32
Dockerfile-aio
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
RUN mkdir -p /var/lib/vmpooler
|
||||||
|
|
||||||
|
WORKDIR /var/lib/vmpooler
|
||||||
|
|
||||||
|
ADD Gemfile* /var/lib/vmpooler/
|
||||||
|
RUN bundle install --system
|
||||||
|
|
||||||
|
RUN ln -s /opt/jruby/bin/jruby /usr/bin/jruby
|
||||||
|
|
||||||
|
RUN echo "deb http://httpredir.debian.org/debian jessie main" >/etc/apt/sources.list.d/jessie-main.list
|
||||||
|
RUN apt-get update && apt-get install -y redis-server && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY . /var/lib/vmpooler
|
||||||
|
|
||||||
|
ENV VMPOOLER_LOG /var/log/vmpooler.log
|
||||||
|
CMD \
|
||||||
|
/etc/init.d/redis-server start \
|
||||||
|
&& /var/lib/vmpooler/scripts/vmpooler_init.sh start \
|
||||||
|
&& while [ ! -f ${VMPOOLER_LOG} ]; do sleep 1; done ; \
|
||||||
|
tail -f ${VMPOOLER_LOG}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue