Skip to content

Commit

Permalink
Use non root image
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Jan 12, 2024
1 parent 0a0e702 commit 03a0ca8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ghcr.io/ba-st/gs64-rowan:v3.7.0
FROM ghcr.io/ba-st/gs64-rowan:non_root_image

COPY start-gemstone.sh /opt/gemstone/start-gemstone.sh
COPY stone-ci.sh /opt/gemstone/stone-ci.sh

USER root
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends \
libcap2-bin \
Expand All @@ -13,4 +14,6 @@ RUN apt-get update \
&& setcap -r $GEMSTONE/sys/pgsvrmain \
;

ENTRYPOINT [ "/opt/gemstone/entrypoint.sh" ]
USER ${GS_USER}

ENTRYPOINT [ "/opt/gemstone/stone-ci.sh" ]
9 changes: 9 additions & 0 deletions start-gemstone.sh → stone-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ printTestingErrorAndExit(){
}

echo "::group::Configuring GemStone services"
# Copy default system config if missing
if [ ! -f "${GEMSTONE_SYS_CONF}/system.conf" ]; then
cp -p "${GEMSTONE}/data/system.conf" "${GEMSTONE_SYS_CONF}/system.conf"
fi

# Create (empty) stone config if missing
if [ ! -f "${GEMSTONE_EXE_CONF}/${STONE_SERVICE_NAME}.conf" ]; then
touch "${GEMSTONE_EXE_CONF}/${STONE_SERVICE_NAME}.conf"
fi
echo "GEM_TEMPOBJ_CACHE_SIZE = 500000KB;" >> "${GEMSTONE_SYS_CONF}/system.conf"
# Workaroung for bug in the native code generator for GS 3.7.0
echo "GEM_NATIVE_CODE_ENABLED = 0;" >> "${GEMSTONE_SYS_CONF}/system.conf"
Expand Down

0 comments on commit 03a0ca8

Please sign in to comment.