-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDockerfile
55 lines (40 loc) · 1.87 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM debian:jessie
MAINTAINER pokev25 <[email protected]>
LABEL Description="This image is used to start the yona-1.0.2" Vendor="pokev25" Version="1.0.2"
## replace debian mirror with ftp.daum.net in Korea
RUN cd /etc/apt && \
sed -i 's/httpredir.debian.org/ftp.daum.net/g' sources.list
## install Oracle Java 8 and clean up installation files
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
RUN echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
RUN apt-get update
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN apt-get install -y oracle-java8-installer oracle-java8-set-default
## install extra package
RUN apt-get install -y unzip
## Timezone
RUN echo "Asia/Seoul" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
## remove cache
RUN rm -rf /var/cache/oracle-jdk8-installer && apt-get clean && rm -rf /var/lib/apt/lists/*
## add yona user
RUN useradd -m -d /yona -s /bin/bash -U yona
RUN mkdir /yona/downloads
## install yona
RUN cd /yona/downloads; \
wget https://github.com/yona-projects/yona/releases/download/v1.0.2/yona-v1.0.2-bin.zip && \
unzip -d /yona/release yona-v1.0.2-bin.zip && \
rm -f yona-v1.0.2-bin.zip
## set environment variables
ENV YONA_HOME "/yona/home"
ENV JAVA_OPTS "-Xmx2048m -Xms2048m"
## add entrypoints
ADD ./entrypoints /yona/entrypoints
RUN chmod +x /yona/entrypoints/*.sh
## yona home directory mount point from host to docker container
VOLUME ["/yona/source", "/yona/home"]
WORKDIR ["/yona"]
## yona service port expose from docker container to host
EXPOSE 9000
## run yona command
ENTRYPOINT ["/yona/entrypoints/bootstrap.sh"]