Skip to content

Commit a9a7bbf

Browse files
committed
tries a minimal gsutil install from the gcloud-sdk image
1 parent ea20135 commit a9a7bbf

File tree

4 files changed

+38
-28
lines changed

4 files changed

+38
-28
lines changed

.github/workflows/images.yaml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,22 +106,22 @@ jobs:
106106
cache-to: type=gha,mode=max
107107
build-contexts: |
108108
yolean/builder-base=docker-image://ghcr.io/yolean/builder-base
109-
# -
110-
# name: Build and push builder-base-gcloud latest
111-
# uses: docker/build-push-action@v5
112-
# env:
113-
# SOURCE_DATE_EPOCH: 0
114-
# with:
115-
# context: builder-base-gcloud
116-
# tags: |
117-
# ghcr.io/yolean/builder-base-gcloud:latest
118-
# ghcr.io/yolean/builder-base-gcloud:${{ github.sha }}
119-
# platforms: linux/amd64,linux/arm64/v8
120-
# push: true
121-
# cache-from: type=gha
122-
# cache-to: type=gha,mode=max
123-
# build-contexts: |
124-
# yolean/builder-base=docker-image://ghcr.io/yolean/builder-base
109+
-
110+
name: Build and push builder-base-gcloud latest
111+
uses: docker/build-push-action@v5
112+
env:
113+
SOURCE_DATE_EPOCH: 0
114+
with:
115+
context: builder-base-gcloud
116+
tags: |
117+
ghcr.io/yolean/builder-base-gcloud:latest
118+
ghcr.io/yolean/builder-base-gcloud:${{ github.sha }}
119+
platforms: linux/amd64,linux/arm64/v8
120+
push: true
121+
cache-from: type=gha
122+
cache-to: type=gha,mode=max
123+
build-contexts: |
124+
yolean/builder-base=docker-image://ghcr.io/yolean/builder-base
125125
-
126126
name: Build and push builder-tooling latest
127127
uses: docker/build-push-action@v5
@@ -183,6 +183,9 @@ jobs:
183183
push: true
184184
cache-from: type=gha
185185
cache-to: type=gha,mode=max
186+
build-contexts: |
187+
yolean/builder-base-gcc=docker-image://ghcr.io/yolean/builder-base-gcc
188+
yolean/builder-base-gcloud=docker-image://ghcr.io/yolean/builder-base-gcloud
186189
-
187190
name: Build and push git-init latest
188191
uses: docker/build-push-action@v5

builder-base-gcloud/Dockerfile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1+
# based on https://hub.docker.com/r/google/cloud-sdk this seems to be the only debian based tag that supports arm
2+
#FROM --platform=$TARGETPLATFORM google/cloud-sdk:debian_component_based as cloud-sdk
3+
FROM --platform=$TARGETPLATFORM google/cloud-sdk:slim as cloud-sdk
4+
5+
# RUN mv /google-cloud-sdk /google-cloud-sdk-full \
6+
# && mkdir -p /google-cloud-sdk/bin \
7+
# && cp /google-cloud-sdk-full/bin/gsutil /google-cloud-sdk/bin/ \
8+
# && gsutil version && false
9+
110
FROM --platform=$TARGETPLATFORM yolean/builder-base
211

312
USER root
413
RUN set -ex; \
514
export DEBIAN_FRONTEND=noninteractive; \
6-
runDeps='python3 google-cloud-cli rsync'; \
7-
buildDeps='gnupg2'; \
8-
\
9-
apt-get update && apt-get install -y --no-install-recommends $buildDeps; \
10-
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list; \
11-
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor > /usr/share/keyrings/cloud.google.gpg; \
15+
runDeps='python3 rsync'; \
1216
\
1317
apt-get update && apt-get install -y --no-install-recommends $runDeps $buildDeps; \
14-
gcloud version; \
15-
gsutil version; \
1618
\
17-
apt-get purge -y --auto-remove $buildDeps; \
1819
rm -rf /var/lib/apt/lists; \
1920
rm -rf /var/log/dpkg.log /var/log/alternatives.log /var/log/apt /root/.gnupg
2021
USER nonroot:nogroup
22+
23+
COPY --from=cloud-sdk /usr/lib/google-cloud-sdk/platform/gsutil /usr/local/gsutil
24+
COPY --from=cloud-sdk /usr/lib/google-cloud-sdk/platform/bundledpythonunix /usr/local/bundledpythonunix
25+
26+
ENV PATH="${PATH}:/usr/local/gsutil"
27+
28+
RUN gsutil version

builder-evidence/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV NODE_PATH=/usr/local/lib/node_modules
1616
RUN npm install -g --ignore-scripts node-gyp@latest
1717
RUN npm install -g duckdb@latest
1818

19-
FROM --platform=$TARGETPLATFORM yolean/builder-base
19+
FROM --platform=$TARGETPLATFORM yolean/builder-base-gcloud
2020

2121
RUN y-parquet-tools -h
2222
COPY --from=node-gyp /usr/local/bin/duckdb /usr/local/bin/duckdb

builder-quarkus/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ COPY --from=dockerclient /usr/local/bin/* /usr/local/bin/
3030
COPY --from=dockerclient /usr/local/libexec/docker /usr/local/libexec/docker
3131
COPY --chown=nonroot:nogroup y-build-* /usr/local/bin/
3232

33-
RUN [ "$PATH" = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/src/ystack/bin" ]
3433
ENV \
3534
CI=true \
3635
GRAALVM_HOME=/opt/mandrel \
3736
JAVA_HOME=/opt/mandrel \
3837
MAVEN_HOME=/usr/share/maven \
3938
MAVEN_CONFIG=/home/nonroot/.m2 \
40-
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/src/ystack/bin:/usr/share/maven/bin:/opt/mandrel/bin
39+
PATH="${PATH}:/usr/share/maven/bin:/opt/mandrel/bin"

0 commit comments

Comments
 (0)