-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
36 lines (33 loc) · 1.04 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
FROM alpine:3.6 AS builder
RUN apk add --update \
bash \
build-base \
curl \
file \
git \
nodejs \
nodejs-npm \
openjdk7 \
libressl-dev \
readline-dev \
vim \
wget \
zlib-dev
RUN npm install -g grunt-cli
RUN wget https://services.gradle.org/distributions/gradle-3.5-bin.zip
RUN unzip -d /usr/local/ ./gradle-3.5-bin.zip
RUN chmod +x /usr/local/gradle-3.5/
ENV PATH /usr/local/gradle-3.5/lib:/usr/local/gradle-3.5/bin:/usr/lib/jvm/java-1.7-openjdk:${PATH}
ENV JAVA_HOME /usr/lib/jvm/java-1.7-openjdk
COPY . /todolist
WORKDIR /todolist/ToDoListClient/
RUN npm install
WORKDIR /todolist/
RUN printf "applicationName=ToDoList\napplicationServerLibrariesPath=ToDoListServerDependencies" > ./gradle.properties
RUN gradle prod
FROM tomee:6-jre-1.7.4-plus AS release
ENV JAVA_OPTS -Dsecurerandom.source=file:/dev/urandom
ENV CATALINA_OPTS -Dsecurerandom.source=file:/dev/urandom
WORKDIR $CATALINA_HOME/webapps
RUN rm -rf ./ROOT
COPY --from=builder todolist/GradleBuild/libs/todolist.war /usr/local/tomee/webapps/ROOT.war