Skip to content

Commit

Permalink
Remove pre-v1.x transitional code
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Nov 20, 2021
1 parent 35520f8 commit a17077f
Show file tree
Hide file tree
Showing 49 changed files with 122 additions and 208 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ For a quick testnet start, you can install prerequisites and configure eth-docke

# Version

This is eth-docker v1.5.10.1
This is eth-docker v1.6
2 changes: 1 addition & 1 deletion besu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- BUILD_TARGET=${BESU_SRC_BUILD_TARGET}
- DOCKER_TAG=${BESU_DOCKER_TAG}
image: besu:local
user: besu
volumes:
- besu-eth1-data:/var/lib/besu
- /etc/timezone:/etc/timezone:ro
Expand All @@ -33,7 +34,6 @@ services:
- eth1
<<: *logging
entrypoint:
- docker-entrypoint.sh
- /opt/besu/bin/besu
- --data-path
- /var/lib/besu
Expand Down
5 changes: 3 additions & 2 deletions besu/Dockerfile.binary
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN set -eux; \

# Create data mount point with permissions
RUN mkdir -p /var/lib/besu && chown -R besu:besu /var/lib/besu && chmod -R 700 /var/lib/besu
COPY ./docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh","/opt/besu/bin/besu"]
USER besu

ENTRYPOINT ["/opt/besu/bin/besu"]
12 changes: 3 additions & 9 deletions besu/Dockerfile.source
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN set -eux; \
apt-get update; \
apt-get install -y gosu ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
# verify that the binary works
gosu nobody true

# See https://stackoverflow.com/a/55757473/12429735RUN
RUN adduser \
--disabled-password \
Expand All @@ -44,6 +37,7 @@ RUN mkdir -p /var/lib/besu && chown -R ${USER}:${USER} /var/lib/besu && chmod -R

# Copy executable
COPY --from=builder /usr/src/besu/build/install/besu/. /opt/besu/
COPY ./docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh","/opt/besu/bin/besu"]
USER ${USER}

ENTRYPOINT ["/opt/besu/bin/besu"]
12 changes: 0 additions & 12 deletions besu/docker-entrypoint.sh

This file was deleted.

1 change: 0 additions & 1 deletion eth1-shared.yml

This file was deleted.

1 change: 0 additions & 1 deletion eth1-standalone.yml

This file was deleted.

1 change: 0 additions & 1 deletion eth1-traefik.yml

This file was deleted.

13 changes: 0 additions & 13 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ envmigrate() {
GETH_DOCKERFILE NM_SRC_BUILD_TARGET NM_DOCKER_TAG NM_DOCKERFILE BESU_SRC_BUILD_TARGET \
BESU_DOCKER_TAG BESU_DOCKERFILE DEPCLI_SRC_BUILD_TARGET DEPCLI_DOCKER_TAG DEPCLI_LOCALDIR \
NODE_EXPORTER_IGNORE_MOUNT_REGEX )
OLD_VARS=( ETH1_NODE ETH1_FALLBACK_NODE1 ETH1_FALLBACK_NODE2 ETH1_NETWORK ETH1_HOST \
ETH1_WS_HOST BN_NODE ETH1_PORT ETH1_RPC_PORT ETH1_WS_PORT )
NEW_VARS=( EC_NODE EC_FALLBACK_NODE1 EC_FALLBACK_NODE2 EC_NETWORK EC_HOST \
EC_WS_HOST CC_NODE EC_P2P_PORT EC_RPC_PORT EC_WS_PORT )

keeptargets=0
for var in "$@"; do
Expand Down Expand Up @@ -276,15 +272,6 @@ envmigrate() {
fi
done
fi
# Migrate from older-style naming
for index in "${!OLD_VARS[@]}"; do
if [ -n "${!OLD_VARS[index]+set}" ]; then
sed -i "s~^\(${NEW_VARS[index]}\s*=\s*\).*$~\1${!OLD_VARS[index]}~" "${ENV_FILE}"
fi
done
# Migrate http://eth1 and http://beacon
sed -i "s/http:\/\/eth1/http:\/\/execution/g" "${ENV_FILE}"
sed -i "s/http:\/\/beacon/http:\/\/consensus/g" "${ENV_FILE}"
rm .env.source
}

Expand Down
2 changes: 1 addition & 1 deletion geth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- DOCKER_TAG=${GETH_DOCKER_TAG}
stop_grace_period: 3m
image: geth:local
user: geth
volumes:
- geth-eth1-data:/var/lib/goethereum
- /etc/timezone:/etc/timezone:ro
Expand All @@ -33,7 +34,6 @@ services:
- eth1
<<: *logging
entrypoint:
- docker-entrypoint.sh
- geth
- --http
- --http.addr
Expand Down
7 changes: 3 additions & 4 deletions geth/Dockerfile.binary
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ ARG BUILD_TARGET
ARG USER=geth
ARG UID=10001

# So we can switch to non-root user if started as root
RUN apk add --no-cache su-exec ca-certificates bash tzdata
RUN apk add --no-cache ca-certificates tzdata

# See https://stackoverflow.com/a/55757473/12429735RUN
RUN adduser \
Expand All @@ -21,6 +20,6 @@ RUN adduser \

RUN mkdir -p /var/lib/goethereum && chown ${USER}:${USER} /var/lib/goethereum

COPY ./docker-entrypoint.sh /usr/local/bin
USER ${USER}

ENTRYPOINT ["docker-entrypoint.sh","geth"]
ENTRYPOINT ["geth"]
6 changes: 3 additions & 3 deletions geth/Dockerfile.source
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FROM alpine:latest
ARG USER=geth
ARG UID=10001

RUN apk add --no-cache ca-certificates su-exec bash tzdata
RUN apk add --no-cache ca-certificates tzdata

# See https://stackoverflow.com/a/55757473/12429735RUN
RUN adduser \
Expand All @@ -32,6 +32,6 @@ RUN mkdir -p /var/lib/goethereum && chown ${USER}:${USER} /var/lib/goethereum
# Copy executable
COPY --from=builder /src/go-ethereum/build/bin/geth /usr/local/bin/

COPY ./docker-entrypoint.sh /usr/local/bin/
USER ${USER}

ENTRYPOINT ["docker-entrypoint.sh","geth"]
ENTRYPOINT ["geth"]
12 changes: 0 additions & 12 deletions geth/docker-entrypoint.sh

This file was deleted.

6 changes: 4 additions & 2 deletions lh-base-notz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- BUILD_TARGET=${LH_SRC_BUILD_TARGET}
- DOCKER_TAG=${LH_DOCKER_TAG}
image: lighthouse:local
user: lhconsensus
stop_grace_period: 1m
volumes:
- lhbeacon-data:/var/lib/lighthouse
Expand All @@ -31,7 +32,6 @@ services:
- eth2
<<: *logging
entrypoint:
- docker-entrypoint.sh
- lighthouse
- bn
- --disable-upnp
Expand All @@ -55,11 +55,11 @@ services:
validator:
restart: "${RESTART}"
image: lighthouse:local
user: lhvalidator
volumes:
- lhvalidator-data:/var/lib/lighthouse
<<: *logging
entrypoint:
- docker-entrypoint.sh
- lighthouse
- vc
- --datadir
Expand All @@ -77,6 +77,7 @@ services:
validator-import:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand All @@ -96,6 +97,7 @@ services:
validator-exit:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand Down
6 changes: 4 additions & 2 deletions lh-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- BUILD_TARGET=${LH_SRC_BUILD_TARGET}
- DOCKER_TAG=${LH_DOCKER_TAG}
image: lighthouse:local
user: lhconsensus
stop_grace_period: 1m
volumes:
- lhbeacon-data:/var/lib/lighthouse
Expand All @@ -32,7 +33,6 @@ services:
- eth2
<<: *logging
entrypoint:
- docker-entrypoint.sh
- lighthouse
- bn
- --disable-upnp
Expand All @@ -56,13 +56,13 @@ services:
validator:
restart: "${RESTART}"
image: lighthouse:local
user: lhvalidator
volumes:
- lhvalidator-data:/var/lib/lighthouse
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
<<: *logging
entrypoint:
- docker-entrypoint.sh
- lighthouse
- vc
- --datadir
Expand All @@ -80,6 +80,7 @@ services:
validator-import:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand All @@ -101,6 +102,7 @@ services:
validator-exit:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand Down
3 changes: 1 addition & 2 deletions lh-consensus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
- BUILD_TARGET=${LH_SRC_BUILD_TARGET}
- DOCKER_TAG=${LH_DOCKER_TAG}
image: lighthouse:local
user: root
user: lhconsensus
stop_grace_period: 1m
volumes:
- lhconsensus-data:/var/lib/lighthouse
Expand All @@ -33,7 +33,6 @@ services:
- eth2
<<: *logging
entrypoint:
- docker-entrypoint.sh
- lighthouse
- bn
- --disable-upnp
Expand Down
5 changes: 5 additions & 0 deletions lh-shared.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "3.4"
services:
consensus:
ports:
- 5052:5052/tcp
4 changes: 3 additions & 1 deletion lh-validator-notz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ services:
validator:
restart: "${RESTART}"
image: lighthouse:local
user: lhvalidator
volumes:
- lhvalidator-data:/var/lib/lighthouse
<<: *logging
entrypoint:
- docker-entrypoint.sh
- lighthouse
- vc
- --datadir
Expand All @@ -31,6 +31,7 @@ services:
validator-import:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand All @@ -50,6 +51,7 @@ services:
validator-exit:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand Down
4 changes: 3 additions & 1 deletion lh-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ services:
validator:
restart: "${RESTART}"
image: lighthouse:local
user: lhvalidator
volumes:
- lhvalidator-data:/var/lib/lighthouse
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
<<: *logging
entrypoint:
- docker-entrypoint.sh
- lighthouse
- vc
- --datadir
Expand All @@ -32,6 +32,7 @@ services:
validator-import:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand All @@ -53,6 +54,7 @@ services:
validator-exit:
restart: "no"
image: lighthouse:local
user: root
volumes:
- lhvalidator-data:/var/lib/lighthouse
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
Expand Down
5 changes: 3 additions & 2 deletions lighthouse/Dockerfile.binary
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ RUN set -eux; \
# Scripts that handle permissions
COPY ./validator-import.sh /usr/local/bin/
COPY ./validator-exit.sh /usr/local/bin/
COPY ./docker-entrypoint.sh /usr/local/bin/

# For voluntary exit
ENV KEYSTORE=nonesuch

ENTRYPOINT ["docker-entrypoint.sh","lighthouse"]
USER lhconsensus

ENTRYPOINT ["lighthouse"]
5 changes: 3 additions & 2 deletions lighthouse/Dockerfile.source
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ COPY --from=builder /usr/local/cargo/bin/lighthouse /usr/local/bin/
# Scripts that handle permissions
COPY ./validator-import.sh /usr/local/bin/
COPY ./validator-exit.sh /usr/local/bin/
COPY ./docker-entrypoint.sh /usr/local/bin/

# For voluntary exit
ENV KEYSTORE=nonesuch

ENTRYPOINT ["docker-entrypoint.sh","lighthouse"]
USER lhconsensus

ENTRYPOINT ["lighthouse"]
18 changes: 0 additions & 18 deletions lighthouse/docker-entrypoint.sh

This file was deleted.

Loading

0 comments on commit a17077f

Please sign in to comment.