diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index f3bcba12917..d646b6ed215 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -71,28 +71,35 @@ jobs: - SERVICE_LOCATION: 'kernel/kernel-ridgenerator-service' SERVICE_NAME: 'kernel-ridgenerator-service' BUILD_ARTIFACT: 'commons' + SQUASH_LAYERS: '10' - SERVICE_LOCATION: 'kernel/kernel-notification-service' SERVICE_NAME: 'kernel-notification-service' BUILD_ARTIFACT: 'commons' + SQUASH_LAYERS: '10' - SERVICE_LOCATION: 'kernel/kernel-pridgenerator-service' SERVICE_NAME: 'kernel-pridgenerator-service' BUILD_ARTIFACT: 'commons' + SQUASH_LAYERS: '11' - SERVICE_LOCATION: 'kernel/kernel-idgenerator-service' SERVICE_NAME: 'kernel-idgenerator-service' BUILD_ARTIFACT: 'commons' + SQUASH_LAYERS: '11' - SERVICE_LOCATION: 'kernel/kernel-salt-generator' SERVICE_NAME: 'kernel-salt-generator' BUILD_ARTIFACT: 'commons' + SQUASH_LAYERS: '9' - SERVICE_LOCATION: 'kernel/kernel-config-server' SERVICE_NAME: 'kernel-config-server' BUILD_ARTIFACT: 'commons' + SQUASH_LAYERS: '6' fail-fast: false - uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21 + uses: Rakshithb1/kattu/.github/workflows/docker-build.yml@MOSIP-35637-1 name: ${{ matrix.SERVICE_NAME }} with: SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} SERVICE_NAME: ${{ matrix.SERVICE_NAME }} BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + SQUASH_LAYERS: ${{ matrix.SQUASH_LAYERS }} secrets: DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} diff --git a/kernel/kernel-config-server/Dockerfile b/kernel/kernel-config-server/Dockerfile index 69381d3b4f7..00934552557 100644 --- a/kernel/kernel-config-server/Dockerfile +++ b/kernel/kernel-config-server/Dockerfile @@ -29,11 +29,6 @@ ARG COMMIT_HASH ARG COMMIT_ID ARG BUILD_TIME -# set working directory for the user -WORKDIR /home/${container_user} - -ENV work_dir=/home/${container_user} - # environment variable to pass GIT URL at docker runtime ENV git_url_env=${git_url} @@ -63,14 +58,20 @@ RUN apt-get -y update \ && groupadd -g ${container_user_gid} ${container_user_group} \ && useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \ && usermod -aG sudo ${container_user} \ -&& echo "%sudo ALL=(ALL) NOPASSWD:/home/${container_user}/${hsm_local_dir}/install.sh" >> /etc/sudoers \ -# change permissions of file inside working dir -&& chown -R ${container_user}:${container_user} /home/${container_user} +&& echo "%sudo ALL=(ALL) NOPASSWD:/home/${container_user}/${hsm_local_dir}/install.sh" >> /etc/sudoers + +# set working directory for the user +WORKDIR /home/${container_user} + +ENV work_dir=/home/${container_user} #ADD execute-jar.sh execute-jar.sh #RUN chmod 777 execute-jar.sh +# change permissions of file inside working dir +RUN chown -R ${container_user}:${container_user} /home/${container_user} + # select container user for all tasks USER ${container_user_uid}:${container_user_gid}