Skip to content

Commit

Permalink
Creating custom Keycloak docker image running in dev-mode automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusSchmidt committed Feb 20, 2024
1 parent 9c5aee6 commit e7a9a95
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Push Docker Image

on:
push:
branches:
- main

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Login to Docker Hub
run: |
echo ${{ secrets.DOCKER_HUB_CRUD_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_CRUD_USER }} --password-stdin
- name: Build, tag and push Docker image
id: build_image
run: |
IMAGE_NAME="denktmiteg/keycloak-dev"
DATETIME_TAG=$(date +'%Y%m%d%H%M%S')
docker build . --file Dockerfile --tag $IMAGE_NAME:23.0.6-latest --tag $IMAGE_NAME:23.0.6-$DATETIME_TAG
docker push $IMAGE_NAME:23.0.6-latest
docker push $IMAGE_NAME:23.0.6-$DATETIME_TAG
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM quay.io/keycloak/keycloak:23.0.6

# Set the default command to start Keycloak in development mode
CMD ["start-dev"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# de.denktmit.images.keycloak-dev
# de.denktmit.images.keycloak-dev
DO NOT USE IN PRODUCTION! Repository for Docker image creation to provide a containerized version of Keycloak with the command set to 'start-dev'
for easy integration with Github Action services, that do not support docker-compos like 'command' overwrite .

0 comments on commit e7a9a95

Please sign in to comment.