-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (23 loc) · 969 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
# This is an example Dockerfile for running a tesla-microservice app in a docker container.
#
# Instructions:
# 1. build uber jar:
# ./lein.sh clean
# ./lein.sh uberjar
# 2. build docker image
# docker build -t tesla-example:latest .
# 3. run docker container
# docker run -d -p 8080:8080 tesla-example:latest
FROM centos:6
MAINTAINER Felix Bechstein <[email protected]>
EXPOSE 8080
# prepare image
RUN yum install -y java-1.8.0-openjdk-headless
USER daemon
# set command line
CMD ["java", "-Dlog_level=info", "-jar", "/tesla-microservice-standalone.jar"]
# instead of logging to stdout, you may log to file in /log. create volume or mount host volume to /log
# RUN mkdir /log && chown daemon /log
# CMD ["java", "-Dlog_level=info", "-Dlog_appender=fileAppender", "-Dlog_location=/log", "-jar", "/tesla-microservice-standalone.jar"]
# drop in uber jar
ADD target/tesla-microservice-*-standalone.jar /tesla-microservice-standalone.jar