forked from leowrites/Campfire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (23 loc) · 751 Bytes
/
Dockerfile
File metadata and controls
36 lines (23 loc) · 751 Bytes
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
# download java 11 image and gradle
FROM gradle:7.5.1-jdk11
RUN apt-get update && apt-get install -y curl gnupg
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
WORKDIR /app
# copy gradle files to container
COPY build.gradle gradlew gradlew.bat ./
# copy over all files in src from the root directory to the working directory
COPY src ./src
# copy over everything other than node_modules from frontend to frontend
COPY frontend ./frontend
# install dependencies for frontend
RUN cd frontend && npm install
# build frontend
RUN cd frontend && npm run build
RUN gradle wrapper
# build gradle project
#RUN ./gradlew build
RUN gradle build -x test
EXPOSE 8080
# run the jar file
CMD ./gradlew bootRun