Skip to content

Commit

Permalink
Add Glibc for PHPStorm remote connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks committed May 16, 2023
1 parent d1ce65f commit 25cdfa0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ FROM drupal

ARG TARGETARCH

ARG GLIBC_VERSION="2.35-r1"
ARG GLIBC_FILE="glibc-${GLIBC_VERSION}.apk"
ARG GLIBC_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/${GLIBC_FILE}"
ARG GLIBC_SHA256="276f43ce9b2d5878422bca94ca94e882a7eb263abe171d233ac037201ffcaf06"

EXPOSE 8443 \
9003

Expand All @@ -15,6 +20,7 @@ RUN --mount=type=bind,source=rootfs/var/lib/nginx/.composer,target=/composer \
cleanup.sh

# Include commonly used tools and xdebug.
# PHPStorm remote requries Glibc.
RUN --mount=type=cache,id=code-server-apk-${TARGETARCH},sharing=locked,target=/var/cache/apk \
apk add \
alpine-sdk \
Expand All @@ -30,6 +36,14 @@ RUN --mount=type=cache,id=code-server-apk-${TARGETARCH},sharing=locked,target=/v
unison \
yarn \
&& \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
download.sh \
--url "${GLIBC_URL}" \
--sha256 "${GLIBC_SHA256}" \
&& \
apk add "${DOWNLOAD_CACHE_DIRECTORY}/${GLIBC_FILE}" && \
mkdir /lib64 && \
ln -s /lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
cleanup.sh

RUN --mount=type=cache,id=code-server-npm-${TARGETARCH},sharing=locked,target=/usr/local/share/.cache/yarn \
Expand Down

0 comments on commit 25cdfa0

Please sign in to comment.