From 03b0084e65728637449ce212c2b92b37ceb1839f Mon Sep 17 00:00:00 2001 From: "Khalifah K. Shabazz" Date: Wed, 8 May 2024 17:08:33 -0400 Subject: [PATCH] test: With Alpine Musl Test installing VS Code Server on Alpine with musl. --- .circleci/config.yml | 21 +++++++++++++++++++-- test/alpine-musl/Dockerfile | 23 +++++++++++------------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f68e1ec..a19c1fb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,7 +70,7 @@ jobs: - attach_workspace: { at: "." } - *remote_worker - run: - name: "Test with Alpine (GLibC edition)" + name: "Test VS Code Server with Alpine (GLibC edition)" command: | cd test/alpine DH_IMG=test-alpine-glibc @@ -84,7 +84,7 @@ jobs: - attach_workspace: { at: "." } - *remote_worker - run: - name: "Build Alpine glibc against NodeJS" + name: "Test VS Code Server with Debian" command: | cd test/debian DH_IMG=test-debian @@ -92,6 +92,20 @@ jobs: docker run --rm --entrypoint /home/app/code-server "${DH_IMG}" --version docker rmi "${DH_IMG}" + test-alpine-musl: + executor: base + steps: + - attach_workspace: { at: "." } + - *remote_worker + - run: + name: "Test VS Code Server with Alpine musl" + command: | + cd test/alpine-musl + DH_IMG=test-alpine-musl + docker build --rm -t "${DH_IMG}" -f ./Dockerfile ../.. + docker run --rm --entrypoint /home/app/code-server "${DH_IMG}" --version + docker rmi "${DH_IMG}" + workflows: quality-control: jobs: @@ -106,6 +120,9 @@ workflows: - test-debian: context: << pipeline.parameters.ctx_auto_release >> requires: [ fetch-code ] + - test-alpine-musl: + context: << pipeline.parameters.ctx_auto_release >> + requires: [ fetch-code ] workflow-selector: when: diff --git a/test/alpine-musl/Dockerfile b/test/alpine-musl/Dockerfile index 0d03d3f..2837d83 100644 --- a/test/alpine-musl/Dockerfile +++ b/test/alpine-musl/Dockerfile @@ -31,15 +31,15 @@ RUN apk --no-progress --purge --no-cache upgrade \ && rm -vrf /var/cache/apk/* ## Add a non-root group and user to runas -#RUN addgroup --system --gid ${USER_GID} ${USER_GROUP} \ -# && adduser --system \ -# --disabled-password \ -# --ingroup ${USER_GROUP} \ -# --uid ${USER_UID} \ -# ${USER_NAME} -# -#USER ${USER_NAME} -# +RUN addgroup --system --gid ${USER_GID} ${USER_GROUP} \ + && adduser --system \ + --disabled-password \ + --ingroup ${USER_GROUP} \ + --uid ${USER_UID} \ + ${USER_NAME} + +USER ${USER_NAME} + COPY --chmod=${USER_NAME}:${USER_NAME} test/alpine/start.sh /usr/local/bin HEALTHCHECK --interval=5m --timeout=3s \ @@ -52,7 +52,6 @@ COPY --chmod=${USER_NAME}:${USER_NAME} setup-server-via-vs-code-cli.sh /tmp # Install VS Code Server RUN /tmp/download-vs-code-server.sh "linux" "alpine" "yes" -RUN #/tmp/setup-server-via-vs-code-cli.sh "linux" "alpine" "yes" +RUN /tmp/setup-server-via-vs-code-cli.sh "alpine" "x64" "yes" -#WORKDIR ${WD} -#SHELL [ "/bin/bash", "-c" ] +WORKDIR ${WD}