From 5b843b076df683b8f7b8e230c0b7c62297c92af2 Mon Sep 17 00:00:00 2001 From: Jarmo Isotalo Date: Sun, 17 Jul 2016 21:44:32 +0300 Subject: [PATCH] Adding dockerfile and docker-compose --- Dockerfile | 11 +++++++++++ docker-compose.yml | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..497f10eb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM maven:3-jdk-8 + +RUN apt-get update && apt-get install -y --no-install-recommends build-essential && rm -rf /var/lib/apt/lists/* + +RUN useradd -g users user && mkdir -p /home/user && chown -R user:users /home/user +WORKDIR /app + +RUN chown -R user:users /app +USER user + +CMD ["/bin/bash"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..4641440e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +cli: + build: . + command: mvn clean test + volumes: + - .:/app