-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
28 lines (20 loc) · 819 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM anapsix/alpine-java:8_jdk_unlimited
WORKDIR /home/app
# install dumb-init; helps dockerized java handle signals properly
# using ADD avoids installing openssl dependency
ADD https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 /usr/bin/dumb-init
RUN chmod +x /usr/bin/dumb-init
ENTRYPOINT ["dumb-init", "--"]
# process will run as non-root `app` user
RUN addgroup app \
&& adduser -s /bin/bash -D app -G app \
&& chown -R app:app .
# install maven
RUN wget http://mirrors.ocf.berkeley.edu/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \
&& tar zxvf apache-maven-3.3.9-bin.tar.gz \
&& rm -f apache-maven-3.3.9-bin.tar.gz
COPY . ./
USER app
EXPOSE 8080
# start with spring boot
CMD apache-maven-3.3.9/bin/mvn spring-boot:run -DgitlabUrl="$GITLAB_URL"