# First we download an image from the Docker universe
# Ubuntu 16.04
# And we will set the Maintainer to be the Eval Demo group
FROM ubuntu:16.04
MAINTAINER Eval Demo Group of Perforce Software
ENV PATH="/sbin:$PATH"
ENV DEBIAN_FRONTEND=noninteractive
# Add the UNIX user swarm
RUN useradd -d /home/swarm -m swarm
RUN usermod -G sudo -a swarm
RUN echo swarm:perforce | /usr/sbin/chpasswd
RUN chown -R swarm:swarm /home/swarm
# Expose ports.
EXPOSE 80
# Install Swarm
RUN apt-get update -y && apt-get install -y wget unzip curl dnsutils
RUN wget -q https://package.perforce.com/perforce.pubkey -O - | apt-key add -
# Add the Perforce repository to the list of package sources
RUN echo 'deb http://package.perforce.com/apt/ubuntu xenial release' > /etc/apt/sources.list.d/perforce.list
# Update the package index again
RUN apt-get update -y && apt-get install -y libreoffice helix-swarm
ADD start.sh /
# ensure ownership correct
RUN chown -R www-data:www-data /opt/perforce/swarm/data
# make sure apache doesn't think it is running
RUN rm -f /var/run/apache2/apache2.pid
CMD [ "/start.sh" ]
# Set the working directory
WORKDIR /home/perforce/perforce1666
#ENV DOCKER_STARTUP=<path-to-startup-script>
#ENV DOCKER_SHUTDOWN=<path-to-shutdown-script>