From c873e7629db2741ab675f2df88ecbc4d53b5215c Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Tue, 4 Dec 2018 12:22:49 -0500 Subject: MUSIC-224 Dockerize MdbcServer This is a single site installation, with a cassandra container, a mariadb container, and an mdbc-server container. To build the docker images, first build mdbc software normally, then use the 'docker' maven profile: mvn -P docker To bring up the environment: cd mdbc-packages/mdbc-docker/compose/one-site docker-compose up Change-Id: Ie48487fc6c7853b80017dfa45aff52801da52cf0 Issue-ID: MUSIC-224 Signed-off-by: Rob Daugherty --- .../docker/docker-files/Dockerfile.mdbc-server | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 mdbc-packages/mdbc-docker/src/main/docker/docker-files/Dockerfile.mdbc-server (limited to 'mdbc-packages/mdbc-docker/src/main/docker/docker-files/Dockerfile.mdbc-server') diff --git a/mdbc-packages/mdbc-docker/src/main/docker/docker-files/Dockerfile.mdbc-server b/mdbc-packages/mdbc-docker/src/main/docker/docker-files/Dockerfile.mdbc-server new file mode 100644 index 0000000..0de50aa --- /dev/null +++ b/mdbc-packages/mdbc-docker/src/main/docker/docker-files/Dockerfile.mdbc-server @@ -0,0 +1,30 @@ +FROM openjdk:8-jdk-alpine + +ARG http_proxy +ARG https_proxy +ENV HTTP_PROXY=$http_proxy +ENV HTTPS_PROXY=$https_proxy +ENV http_proxy=$HTTP_PROXY +ENV https_proxy=$HTTPS_PROXY + +# Update the package list and upgrade installed packages +RUN apk update && apk upgrade + +# Install commonly needed tools +RUN apk --no-cache add curl netcat-openbsd sudo + +# Create 'mdbc' user +RUN addgroup -g 1000 mdbc && adduser -S -u 1000 -G mdbc -s /bin/sh mdbc + +RUN mkdir /app && mkdir /app/config + +COPY maven/mdbc-server.jar /app +COPY scripts/start-mdbc-server.sh /app +COPY scripts/wait-for.sh /app + +RUN chown -R mdbc:mdbc /app && chmod 700 /app/*.sh + +VOLUME /app/config + +WORKDIR /app +CMD ["/app/start-mdbc-server.sh"] -- cgit 1.2.3-korg