Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker images to use the non-root version of the base image #7

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 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

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