-
Notifications
You must be signed in to change notification settings - Fork 169
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (37 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
52 lines (37 loc) · 1.43 KB
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
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y wget
#Java 15 Setup
RUN apt-get update --fix-missing
RUN apt update
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:linuxuprising/java
RUN apt update
RUN echo "oracle-java15-installer shared/accepted-oracle-license-v1-2 select true" | debconf-set-selections
RUN echo "oracle-java15-installer shared/accepted-oracle-license-v1-2 seen true" | debconf-set-selections
RUN apt install -y --force-yes oracle-java15-installer
#Scala setup
RUN apt-get remove scala-library scala
RUN wget http://scala-lang.org/files/archive/scala-2.13.4.deb
RUN dpkg -i scala-2.13.4.deb
RUN apt-get update
RUN apt-get install -y scala
RUN echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
RUN apt-get update
RUN apt-get install -y sbt
#Maven Setup
RUN apt-get install -y maven
# Set the home directory to /root and cd into that directory
ENV HOME /root
WORKDIR /root
# Copy all app files into the image
COPY . .
# Download dependancies and build the app
RUN mvn package
# Allow port 8080 to be accessed from outside the container
EXPOSE 8080
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
RUN chmod +x /wait
# Run the app
CMD /wait && java -jar target/office-hours-0.0.1-jar-with-dependencies.jar