Skip to content

Commit

Permalink
Build and publish ghcr docker image (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrongestNumber9 authored May 17, 2023
1 parent 0c43aa5 commit a01a413
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/upload_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,20 @@ jobs:
with:
files: rpm/target/rpm/com.teragrep-k8s_01/RPMS/noarch/com.teragrep-k8s_01-*.noarch.rpm

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lowercase repository name
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV

- name: 'Build Image'
run: |
docker buildx build --output type=docker --tag ghcr.io/${{ env.REPO_LC }}/app:${{ github.event.release.tag_name }} .
docker push ghcr.io/${{ env.REPO_LC }}/app:${{ github.event.release.tag_name }}
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM rockylinux:8
COPY rpm/target/rpm/com.teragrep-k8s_01/RPMS/noarch/com.teragrep-k8s_01-*.rpm /rpm/
RUN dnf -y install jq java-1.8.0-headless /rpm/*.rpm && yum clean all
VOLUME /opt/teragrep/k8s_01/var
VOLUME /opt/teragrep/k8s_01/etc
WORKDIR /opt/teragrep/k8s_01
ENTRYPOINT [ "/usr/bin/java", "-jar", "lib/k8s_01.jar" ]
2 changes: 1 addition & 1 deletion etc/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"kubernetes": {
"logdir": "testlogs",
"logdir": "/var/log/containers",
"url": "https://127.0.0.1:8443",
"cacheExpireInterval": 900,
"cacheMaxEntries": 4096,
Expand Down

0 comments on commit a01a413

Please sign in to comment.