Skip to content

Commit

Permalink
Switched to Dockerfile for image building
Browse files Browse the repository at this point in the history
added `curl`
  • Loading branch information
heidrifx committed Aug 15, 2024
1 parent 7dbee45 commit 164c9b1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/buildAndPushImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,9 @@ jobs:
run: echo $DOCKER_HUB_TOKEN | docker login -u well5a --password-stdin
env:
DOCKER_HUB_TOKEN: ${{ secrets.DOCKERHUBTOKEN }}

- name: Build the Docker image
run: docker build . --file Dockerfile --tag well5a/$IMAGE_NAME:$IMAGE_TAG

- name: Install pack CLI via the official buildpack Action https://github.com/buildpacks/github-actions#setup-pack-cli-action
uses: buildpacks/github-actions/[email protected]

- name: Build app with pack CLI using Buildpack Cache image (see https://buildpacks.io/docs/app-developer-guide/using-cache-image/) & publish to Docker Hub
run: |
pack build index.docker.io/well5a/$IMAGE_NAME:$IMAGE_TAG \
--builder paketobuildpacks/builder:base \
--path . \
--cache-image index.docker.io/well5a/$IMAGE_NAME-paketo-cache-image:$IMAGE_TAG \
--publish
- name: Push the Docker image
run: docker push well5a/$IMAGE_NAME:$IMAGE_TAG
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM debian:latest

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y default-jdk maven curl \
&& apt-get autoremove -y \
&& apt-get autoclean -y

RUN mkdir -p /app/target
WORKDIR /app

COPY pom.xml .
COPY src ./src

RUN mvn clean package

CMD java -jar target/analysis-manager-0.0.1-SNAPSHOT.jar

0 comments on commit 164c9b1

Please sign in to comment.