forked from gb/guia-de-servicos-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (29 loc) · 1.23 KB
/
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
29
30
31
32
FROM centos:centos7
#pŕepare environment
RUN rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems && \
curl -s -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.repo && \
yum -y update && \
yum -y install zulu-8-8.13.0.5-1 epel-release && \
yum -y install nodejs && \
curl -s -L -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && chmod +x /usr/bin/jq
# environment default env
ENV JAVA_HOME "/usr/lib/jvm/zulu-8"
ENV JAVA_OPTS: '-Dfile.encoding=UTF-8 -Xms256M -Xmx1G -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC'
ENV SPRING_THYMELEAF_CACHE 'true'
ENV FLAGS_GIT_PUSH 'true'
ENV ENDPOINTS_ENABLED 'false'
ENV ENDPOINTS_JOLOKIA_ENABLED 'false'
ENV ENDPOINTS_INFO_ENABLED 'true'
ENV ENDPOINTS_HEALTH_ENABLED 'true'
ENV ENDPOINTS_HEALTH_SENSITIVE 'false'
#build
ADD . build
WORKDIR build
RUN ./gradlew assembleMainDist && \
cp -rf ./build/distributions/*.tar / && \
mkdir /portal && \
tar xvf /*.tar -C /portal --strip-components=1
#rm -rf ./build
EXPOSE 8080
#run cmd
CMD /portal/bin/portal-de-servicos