Skip to content

Commit

Permalink
github actions: upgrade the plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed Dec 4, 2024
1 parent cc0d744 commit c100552
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.m2/repository
Expand Down
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Allows you to run this app easily as a docker container.
# See README.md for more details.
#
# 1. Build the image with: docker build --no-cache -t test/vaadin8-sampler:latest .
# 2. Run the image with: docker run --rm -ti -p8080:8080 -m256m test/vaadin8-sampler
#
# Uses Docker Multi-stage builds: https://docs.docker.com/build/building/multi-stage/

# The "Build" stage. Copies the entire project into the container, into the /app/ folder, and builds it.
FROM eclipse-temurin:11 AS BUILD
RUN apt update && apt install unzip -y
COPY . /app/
WORKDIR /app/
RUN ./mvnw -C clean test package -Pproduction
WORKDIR /app/target/
RUN ls -la
RUN unzip *.zip -d app/
# At this point, we have the app (executable bash scrip plus a bunch of jars) in the
# /app/target/app/ folder.

# The "Run" stage. Start with a clean image, and copy over just the app itself, omitting gradle, npm and any intermediate build files.
FROM eclipse-temurin:11
COPY --from=BUILD /app/target/app /app/
WORKDIR /app/
EXPOSE 8080
ENTRYPOINT ./bin/app

0 comments on commit c100552

Please sign in to comment.