File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ RUN set -ex; \
15
15
RUN echo '#!/bin/sh' > /tmp/xdg-open && chmod u+x /tmp/xdg-open
16
16
17
17
# TODO needs a bit more distro than gcr.io/distroless/base but not this much
18
- FROM --platform=$TARGETPLATFORM yolean/docker-base
18
+ FROM --platform=$TARGETPLATFORM yolean/homedir
19
19
20
20
# TODO note
21
21
# Failed to download extension "ui" at URL "http://extensions.duckdb.org/v1.2.1/linux_arm64_gcc4/ui.duckdb_extension.gz" (HTTP 403)
Original file line number Diff line number Diff line change
1
+ FROM --platform=$TARGETPLATFORM yolean/docker-base \
2
+ as base
3
+
4
+ FROM base as nonroot
5
+ WORKDIR /nonroot
6
+ RUN set -e; \
7
+ mkdir -p home/nonroot/.cache; \
8
+ chown root home; chown -R 65532:65534 home/nonroot
9
+
10
+ FROM base
11
+ COPY --from=nonroot /nonroot /
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ if [[ ! -z "$SOURCE_COMMIT" ]]; then
15
15
fi
16
16
fi
17
17
18
+ # note that docker-base isn't actually nonroot, we just want to build that first
18
19
MULTIARCH_NONROOT="
19
20
docker-base
20
21
builder-base
@@ -35,6 +36,7 @@ runtime-deno
35
36
"
36
37
37
38
MULTIARCH_TONONROOT="
39
+ homedir
38
40
java
39
41
node
40
42
node-kafka
Original file line number Diff line number Diff line change
1
+ FROM --platform=$TARGETPLATFORM yolean/homedir:root
2
+
3
+ # Appends the same nonroot directives as https://github.com/Yolean/kubernetes-kafka/tree/master/nonroot
4
+ # i.e. https://github.com/solsson/dockerfiles/tree/native/kafka-nonroot
5
+ RUN grep 'nonroot:x:65532' /etc/passwd || \
6
+ echo 'nonroot:x:65532:65534:nonroot:/home/nonroot:/usr/sbin/nologin' >> /etc/passwd && \
7
+ mkdir -p /home/nonroot && touch /home/nonroot/.bash_history && chown -R 65532:65534 /home/nonroot
8
+ USER nonroot:nogroup
You can’t perform that action at this time.
0 commit comments