-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·33 lines (20 loc) · 765 Bytes
/
Dockerfile
File metadata and controls
executable file
·33 lines (20 loc) · 765 Bytes
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
33
#Get base image having openjdk version 8
FROM openjdk:8u131-jre
MAINTAINER Chenna Vemula <cvemula.unix@gmail.com>
#Expose ports
EXPOSE 8080
ENV JAVA_VER=1.8.0
# This part we can run if the base image doesn't have the Java8 Installed
# RUN yum install -y wget \
# yum install -y java-1.8.0-openjdk-headless \
# yum clean all
RUN mkdir /projectname
# Add jar file from jenkins workspace or from S3/Artifactory
ADD projectname-1.0.jar /projectname
WORKDIR /projectname
RUN chown -R 1001:1001 /projectname
USER 1001
#RUN bash -c "touch /projectname//projectname-1.0.jar"
#ENTRYPOINT exec java $JAVA_OPTS -jar /project-name//projectname-1.0.jar
# Mention the Starting Point of the Docker Container
CMD ["java","-jar","/projectname-1.0.jar"]