Skip to content

Commit

Permalink
Issue #3628: support the target otobo-web
Browse files Browse the repository at this point in the history
because dedicated targes are needed in new version of OTOBO
  • Loading branch information
bschmalhofer committed Jul 29, 2024
1 parent b12bcfa commit 6330f3a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/docker_image_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
GIT_BRANCH=${{ env.otobo_branch }}
GIT_COMMIT=${{ env.otobo_commit }}
tags: ${{ env.otobo_ref }}
target: otobo-web
cache-from: type=gha
cache-to: type=gha,mode=max`

Expand Down Expand Up @@ -100,5 +101,6 @@ jobs:
GIT_BRANCH=${{ env.otobo_branch }}
GIT_COMMIT=${{ env.otobo_commit }}
tags: ${{ env.otobo_ref }}
target: otobo-web
cache-from: type=gha
cache-to: type=gha,mode=max`
9 changes: 9 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@
#docker -v
#printenv

# Specify the target in order to stay compatible with newer versions of OTOBO.
# In newer version different image are built with the same Dockerfile.
TARGET_OPTION=$(case $DOCKERFILE_PATH in
"otobo.web.dockerfile") echo "--target=otobo-web" ;;
*) echo "" ;;
esac)

# build the Docker image
# add the option '--progress plain' for seeing the printed output
docker build\
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')"\
--build-arg "DOCKER_TAG=$DOCKER_TAG"\
Expand All @@ -26,4 +34,5 @@ docker build\
--build-arg "GIT_REPO=$(git config --get remote.origin.url)"\
-f ./$BUILD_PATH/$DOCKERFILE_PATH\
-t $IMAGE_NAME\
$TARGET_OPTION\
./$BUILD_PATH
2 changes: 1 addition & 1 deletion otobo.web.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# The Debian version is explicitly set to buster, that is Debian 10.
#
# The Perl module installer 'cpanm' is already installed.
FROM perl:5.32-buster
FROM perl:5.32-buster AS otobo-web

# First there is some initial setup that needs to be done by root.
USER root
Expand Down

0 comments on commit 6330f3a

Please sign in to comment.