Skip to content

Commit

Permalink
test: With Alpine Musl
Browse files Browse the repository at this point in the history
Test installing VS Code Server on Alpine with musl.
  • Loading branch information
b01 committed May 9, 2024
1 parent 8d5af63 commit 03b0084
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
21 changes: 19 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -84,14 +84,28 @@ 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
docker build --rm -t "${DH_IMG}" -f ./Dockerfile ../..
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:
Expand All @@ -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:
Expand Down
23 changes: 11 additions & 12 deletions test/alpine-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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}

0 comments on commit 03b0084

Please sign in to comment.