Skip to content

Commit

Permalink
Merge pull request #31 from bento-platform/releases/v3.6
Browse files Browse the repository at this point in the history
patching api build host gid
(cancelled elasticsearch build, api-build local test passed)
  • Loading branch information
brouillette authored Dec 13, 2022
2 parents c632b0a + a12b55b commit 027c860
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/api.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
build-args: |
BUILDER_BASE_IMAGE=${{ env.GOHAN_API_BUILDER_BASE_IMAGE }}
BASE_IMAGE=${{ env.GOHAN_API_BASE_IMAGE }}
HOST_USER_UID=1000
HOST_USER_GID=1000
registry: ghcr.io
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
18 changes: 9 additions & 9 deletions src/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ RUN apk update && \
xz-dev zlib-dev bzip2-dev

# Security :
# ARG HOST_USER_UID
# ARG HOST_USER_GID
# ARG OS_NAME
# RUN if [ $OS_NAME != darwin ]; \
# then addgroup -S apigroup -g $HOST_USER_GID || true; \
# else addgroup -S apigroup || true; \
# fi && \
# adduser -S apiuser -u $HOST_USER_UID -G apigroup || true
# # note: ' || true' ignores possible minor errors
ARG HOST_USER_UID
ARG HOST_USER_GID
ARG OS_NAME
RUN if [ $OS_NAME != darwin ]; \
then addgroup -S apigroup -g $HOST_USER_GID || true; \
else addgroup -S apigroup || true; \
fi && \
adduser -S apiuser -u $HOST_USER_UID -G apigroup || true
# note: ' || true' ignores possible minor errors

USER apiuser

Expand Down

0 comments on commit 027c860

Please sign in to comment.