forked from jhipster/jhipster-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (19 loc) · 821 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
FROM openjdk:8-jdk-alpine
# Add jhipster-registry source
ADD . /code/
# Add OpenSSH, package the application and delete all lib
RUN apk update && apk add openssh && \
cd /code/ && \
rm -Rf target && \
chmod +x /code/mvnw && \
sleep 1 && \
./mvnw package && \
mv /code/target/*.war /jhipster-registry.war && \
rm -Rf /code/ /root/.m2/wrapper/ /root/.m2/repository/ /var/cache/apk/*
EXPOSE 8761
VOLUME /tmp
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
SPRING_PROFILES_ACTIVE=prod,native \
GIT_URI=https://github.com/jhipster/jhipster-registry/ \
GIT_SEARCH_PATHS=central-config
CMD ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/jhipster-registry.war","--spring.cloud.config.server.git.uri=${GIT_URI}","--spring.cloud.config.server.git.search-paths=${GIT_SEARCH_PATHS}"]