Skip to content

Commit e48e77e

Browse files
committed
Dockerfiles explicitly add adduser and bash
1 parent 68f12b8 commit e48e77e

29 files changed

Lines changed: 273 additions & 103 deletions

ethdo/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ FROM wealdtech/ethdo:latest
44
ARG USER=ethdo
55
ARG UID=1000
66

7+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
8+
gosu \
9+
adduser \
10+
bash \
11+
jq \
12+
&& gosu nobody true \
13+
&& apt-get clean \
14+
&& rm -rf /var/lib/apt/lists/*
15+
716
# See https://stackoverflow.com/a/55757473/12429735RUN
817
RUN adduser \
918
--disabled-password \

ethrex/Dockerfile.binary

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
1515
ca-certificates \
1616
tzdata \
1717
gosu \
18+
adduser \
19+
bash \
1820
git \
1921
git-lfs \
2022
wget \
2123
jq \
22-
adduser \
2324
&& apt-get clean \
2425
&& rm -rf /var/lib/apt/lists/*
2526

ethrex/Dockerfile.source

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
101101
ca-certificates \
102102
tzdata \
103103
gosu \
104+
adduser \
105+
bash \
104106
git \
105107
git-lfs \
106108
wget \
107-
adduser \
108109
jq \
109110
&& apt-get clean \
110111
&& rm -rf /var/lib/apt/lists/*

ethstaker-deposit-cli/Dockerfile.binary

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ ARG SRC_REPO
1010
ARG USER=depcli
1111
ARG UID=1000
1212

13+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
14+
gosu \
15+
adduser \
16+
bash \
17+
&& gosu nobody true \
18+
&& apt-get clean \
19+
&& rm -rf /var/lib/apt/lists/*
20+
1321
# See https://stackoverflow.com/a/55757473/12429735RUN
1422
RUN adduser \
1523
--disabled-password \
@@ -20,13 +28,6 @@ RUN adduser \
2028
--uid "${UID}" \
2129
"${USER}"
2230

23-
RUN set -eux; \
24-
apt-get update; \
25-
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends gosu; \
26-
rm -rf /var/lib/apt/lists/*; \
27-
# verify that the binary works
28-
gosu nobody true
29-
3031
WORKDIR /app
3132

3233
RUN chown -R ${USER}:${USER} /app

ethstaker-deposit-cli/Dockerfile.source

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ ARG DOCKER_REPO
66

77
RUN mkdir -p /src
88

9-
RUN apt-get update && apt-get install -y --no-install-recommends bash git
9+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
10+
bash \
11+
git \
12+
&& apt-get clean \
13+
&& rm -rf /var/lib/apt/lists/*
1014

1115
ARG BUILD_TARGET
1216
ARG SRC_REPO
@@ -32,10 +36,13 @@ EOF
3236

3337
FROM python:3.13-trixie
3438

35-
RUN apt-get update && apt-get install -y --no-install-recommends build-essential bash gosu \
36-
&& gosu nobody true \
37-
&& apt-get clean \
38-
&& rm -rf /var/lib/apt/lists/*
39+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
40+
gosu \
41+
adduser \
42+
build-essential \
43+
&& gosu nobody true \
44+
&& apt-get clean \
45+
&& rm -rf /var/lib/apt/lists/*
3946

4047
ARG USER=depcli
4148
ARG UID=1000

flashbots/Dockerfile.binary

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARG SRC_REPO
99
ARG USER=mev
1010
ARG UID=10666
1111

12+
# Always included in alpine:3
1213
# See https://stackoverflow.com/a/55757473/12429735RUN
1314
RUN adduser \
1415
--disabled-password \

flashbots/Dockerfile.source

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ FROM alpine:3
3636
ARG USER=mev
3737
ARG UID=10666
3838

39+
# Always included in alpine:3
3940
# See https://stackoverflow.com/a/55757473/12429735RUN
4041
RUN adduser \
4142
--disabled-password \

geth/Dockerfile.binary

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN addgroup \
1919
--gid "${GID}" \
2020
"${USER}"
2121

22+
# Always included in alpine:3
2223
# See https://stackoverflow.com/a/55757473/12429735RUN
2324
RUN adduser \
2425
--disabled-password \

geth/Dockerfile.source

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN addgroup \
4646
--gid "${GID}" \
4747
"${USER}"
4848

49+
# Always included in alpine:3
4950
# See https://stackoverflow.com/a/55757473/12429735RUN
5051
RUN adduser \
5152
--disabled-password \

grandine/Dockerfile.binary

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ ARG SRC_REPO
1111
ARG USER=gdconsensus
1212
ARG UID=10002
1313

14+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
15+
ca-certificates \
16+
tzdata \
17+
gosu \
18+
adduser \
19+
bash \
20+
git \
21+
git-lfs \
22+
curl \
23+
&& gosu nobody true \
24+
&& apt-get clean \
25+
&& rm -rf /var/lib/apt/lists/*
26+
1427
# See https://stackoverflow.com/a/55757473/12429735RUN
1528
RUN adduser \
1629
--disabled-password \
@@ -21,13 +34,6 @@ RUN adduser \
2134
--uid "${UID}" \
2235
"${USER}"
2336

24-
RUN set -eux; \
25-
apt-get update; \
26-
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends gosu ca-certificates bash tzdata git git-lfs curl; \
27-
rm -rf /var/lib/apt/lists/*; \
28-
# verify that the binary works
29-
gosu nobody true
30-
3137
# Create data mount point with permissions
3238
RUN mkdir -p /var/lib/grandine/ee-secret && chown -R ${USER}:${USER} /var/lib/grandine \
3339
&& chmod -R 700 /var/lib/grandine && chmod 777 /var/lib/grandine/ee-secret

0 commit comments

Comments
 (0)