Skip to content

Commit 828daec

Browse files
authored
fix devcontainer (#19807)
1 parent 3cf95a6 commit 828daec

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,14 @@ RUN cd /usr/bin && curl -fsSL https://github.com/mikefarah/yq/releases/download/
158158
RUN cd /usr/bin && curl -fsSL https://github.com/c4milo/github-release/releases/download/v1.1.0/github-release_v1.1.0_linux_${TARGETARCH}.tar.gz | tar xz
159159

160160
### Protobuf
161-
RUN set -ex \
162-
&& tmpdir=$(mktemp -d) \
163-
&& curl -fsSL -o $tmpdir/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-linux-x86_64.zip \
161+
RUN arch=$(uname -m); \
162+
case $arch in \
163+
x86_64) arch=x86_64 ;; \
164+
aarch64|arm64) arch=aarch_64 ;; \
165+
*) echo "Unsupported architecture: $arch"; exit 1 ;; \
166+
esac; \
167+
tmpdir=$(mktemp -d) \
168+
&& curl -fsSL -o $tmpdir/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-linux-${arch}.zip \
164169
&& mkdir -p /usr/lib/protoc && cd /usr/lib/protoc && unzip $tmpdir/protoc.zip \
165170
&& chmod -R o+r+x /usr/lib/protoc/include \
166171
&& chmod -R +x /usr/lib/protoc/bin \
@@ -324,4 +329,4 @@ ENV PRE_COMMIT_HOME=/workspace/.pre-commit
324329
# Setting the environment variable here so that it will be accessible to all tasks and
325330
# terminal sessions in Gitpod workspaces.
326331
ENV PREVIEW_ENV_DEV_SA_KEY_PATH=/root/.config/gcloud/sa.json
327-
ENV GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES=1
332+
ENV GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES=1

0 commit comments

Comments
 (0)