forked from vfarcic/books-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (24 loc) · 958 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
29
# Version: 0.1
FROM ubuntu:14.04
MAINTAINER Viktor Farcic "[email protected]"
# Packages
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt utopic main restricted universe multiverse \n\
deb mirror://mirrors.ubuntu.com/mirrors.txt utopic-updates main restricted universe multiverse \n\
deb mirror://mirrors.ubuntu.com/mirrors.txt utopic-backports main restricted universe multiverse \n\
deb mirror://mirrors.ubuntu.com/mirrors.txt utopic-security main restricted universe multiverse" > /etc/apt/sources.list.d/all-mirrors.list
RUN apt-get update && \
apt-get -y install --no-install-recommends openjdk-7-jdk mongodb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# MongoDB files
RUN mkdir -p /data/db
VOLUME ["/data/db"]
# Service
ADD target/scala-2.10/books-service-assembly-1.0.jar /bs.jar
# Default command
ENV DB_DBNAME books
ENV DB_COLLECTION books
ADD run.sh /run.sh
RUN chmod +x /run.sh
CMD ["/run.sh"]
EXPOSE 8080