Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes docker settings #18

Merged
merged 2 commits into from
Apr 4, 2024
Merged
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
18 changes: 18 additions & 0 deletions .github/workflows/upload_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,21 @@ jobs:
files: |
rpm/target/rpm/com.teragrep-lsh_01/RPMS/noarch/com.teragrep-lsh_01-*.rpm
target/lsh_01-jar-with-dependencies.jar

- 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 }}:${{ github.event.release.tag_name }} --tag ghcr.io/${{ env.REPO_LC }}:latest .
docker push ghcr.io/${{ env.REPO_LC }} --all-tags
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rockylinux:8
COPY rpm/target/rpm/com.teragrep-lsh_01/RPMS/noarch/com.teragrep-lsh_01-*.rpm /lsh_01.rpm
RUN dnf install -y /lsh_01.rpm && rm -f /lsh_01.rpm && dnf clean all
COPY docker-entrypoint.sh /docker-entrypoint.sh
USER srv-lsh_01
ENTRYPOINT ["/usr/bin/java"]
CMD ["-jar", "/opt/teragrep/lsh_01/lib/lsh_01.jar"]
CMD ["-Dproperties.file=/config/config.properties", "-jar", "/opt/teragrep/lsh_01/share/lsh_01.jar"]
kortemik marked this conversation as resolved.
Show resolved Hide resolved