Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# use gradle 7.6, jdk-11 like video on d2l
FROM gradle:7.6-jdk11 AS builder
WORKDIR /home/gradle/project

# Copy all project files into the container
COPY . .

# Update the package lists to fetch the latest versions of available packages
RUN apt-get update

# installing necessary dependencies
RUN apt-get install -y python3 python3-pip curl unzip
#cleaned up so more image layers arent present

# cleaning up the cache to make the imahe as small as possible
RUN apt-get clean

# clean and build project, avoid the daemon
RUN gradle clean build --no-daemon --refresh-dependencies

# tomcat base img, jdk 11 use again
FROM tomcat:9-jre11

# working dir inside tomcat container
WORKDIR /usr/local/tomcat/webapps

# take out default ROOT app if there is any
RUN rm -rf ROOT

# copy war file that was built from initial stage to tomcat webapps directory, renamed to ROOT
COPY --from=builder /home/gradle/project/build/libs/*.war ./ROOT.war

# Expose port 8080 so the application can be accessed from outside the container
EXPOSE 8080
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ plugins {

// gretty is a gradle plugin to make it easy to run a server and hotswap code at runtime.
// https://plugins.gradle.org/plugin/org.gretty
id 'org.gretty' version '3.0.4'
id 'org.gretty' version "3.1.5"
//had to update gradle version as previous version was outdated

// provides access to a database versioning tool.
id "org.flywaydb.flyway" version "6.0.8"
Expand Down
Binary file modified docs/BDD_video.mp4
Binary file not shown.