Skip to content

Commit

Permalink
Revert "Remove dasel (eth-educators#1405)" (eth-educators#1407)
Browse files Browse the repository at this point in the history
This reverts commit 8e7ef08.
  • Loading branch information
yorickdowne authored May 17, 2023
1 parent fa6004d commit 8cbbeca
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions nethermind/Dockerfile.binary
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG DOCKER_TAG

#FROM alpine:3 as dasel
#RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
# wget -q https://github.com/TomWright/dasel/releases/download/v2.2.0/dasel_linux_${arch} -O /usr/local/bin/dasel && \
# chmod +x /usr/local/bin/dasel
FROM alpine as dasel
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
wget -q https://github.com/TomWright/dasel/releases/download/v2.2.0/dasel_linux_${arch} -O /usr/local/bin/dasel && \
chmod +x /usr/local/bin/dasel

FROM nethermind/nethermind:${DOCKER_TAG}

Expand Down Expand Up @@ -42,7 +42,7 @@ RUN chown -R ${USER}:${USER} /nethermind
RUN mkdir -p /var/lib/nethermind/ee-secret && chown -R ${USER}:${USER} /var/lib/nethermind && chmod -R 700 /var/lib/nethermind && chmod 777 /var/lib/nethermind/ee-secret

# Cannot assume buildkit, hence no chmod
#COPY --from=dasel --chown=${USER}:${USER} /usr/local/bin/dasel /usr/local/bin/
COPY --from=dasel --chown=${USER}:${USER} /usr/local/bin/dasel /usr/local/bin/
COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/
# Belt and suspenders
RUN chmod -R 755 /usr/local/bin/*
Expand Down
10 changes: 5 additions & 5 deletions nethermind/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG DOCKER_TAG

#FROM alpine:3 as dasel
#RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
# wget -q https://github.com/TomWright/dasel/releases/download/v2.2.0/dasel_linux_${arch} -O /usr/local/bin/dasel && \
# chmod +x /usr/local/bin/dasel
FROM alpine as dasel
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
wget -q https://github.com/TomWright/dasel/releases/download/v2.2.0/dasel_linux_${arch} -O /usr/local/bin/dasel && \
chmod +x /usr/local/bin/dasel

FROM nethermindeth/nethermind:${DOCKER_TAG}

Expand Down Expand Up @@ -42,7 +42,7 @@ RUN chown -R ${USER}:${USER} /nethermind
RUN mkdir -p /var/lib/nethermind/ee-secret && chown -R ${USER}:${USER} /var/lib/nethermind && chmod -R 700 /var/lib/nethermind && chmod 777 /var/lib/nethermind/ee-secret

# Cannot assume buildkit, hence no chmod
#COPY --from=dasel --chown=${USER}:${USER} /usr/local/bin/dasel /usr/local/bin/
COPY --from=dasel --chown=${USER}:${USER} /usr/local/bin/dasel /usr/local/bin/
COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/
# Belt and suspenders
RUN chmod -R 755 /usr/local/bin/*
Expand Down
10 changes: 5 additions & 5 deletions nethermind/Dockerfile.source
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ RUN bash -c "\
git submodule update --init --recursive && \
dotnet publish src/Nethermind/Nethermind.Runner -c release -o out"

#FROM alpine:3 as dasel
#RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
# wget -q https://github.com/TomWright/dasel/releases/download/v2.2.0/dasel_linux_${arch} -O /usr/local/bin/dasel && \
# chmod +x /usr/local/bin/dasel
FROM alpine as dasel
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
wget -q https://github.com/TomWright/dasel/releases/download/v2.2.0/dasel_linux_${arch} -O /usr/local/bin/dasel && \
chmod +x /usr/local/bin/dasel

FROM mcr.microsoft.com/dotnet/aspnet:7.0

Expand Down Expand Up @@ -55,7 +55,7 @@ RUN chown -R ${USER}:${USER} /nethermind
RUN mkdir -p /var/lib/nethermind/ee-secret && chown -R ${USER}:${USER} /var/lib/nethermind && chmod -R 700 /var/lib/nethermind && chmod 777 /var/lib/nethermind/ee-secret

# Cannot assume buildkit, hence no chmod
#COPY --from=dasel --chown=${USER}:${USER} /usr/local/bin/dasel /usr/local/bin/
COPY --from=dasel --chown=${USER}:${USER} /usr/local/bin/dasel /usr/local/bin/
COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/
# Belt and suspenders
RUN chmod -R 755 /usr/local/bin/*
Expand Down
26 changes: 13 additions & 13 deletions nethermind/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ fi
# <logger name="JsonRpc.*" minlevel="Warn" writeTo="auto-colored-console-async" final="true"/>
# <logger name="JsonRpc.*" final="true"/>
# Set the JSON RPC logging level
LOG_LINE=$(awk '/<logger name=\"\*\" minlevel=\"Off\" writeTo=\"seq\" \/>/{print NR}' /nethermind/NLog.config)
sed -e "${LOG_LINE} i \ <logger name=\"JsonRpc\.\*\" final=\"true\"/>\\n" -i /nethermind/NLog.config
sed -e "${LOG_LINE} i \ <logger name=\"JsonRpc\.\*\" minlevel=\"Warn\" writeTo=\"auto-colored-console-async\" final=\"true\"/>" -i /nethermind/NLog.config
sed -e "${LOG_LINE} i \ <logger name=\"JsonRpc\.\*\" minlevel=\"Warn\" writeTo=\"file-async\" final=\"true\"\/>" -i /nethermind/NLog.config
#LOG_LINE=$(awk '/<logger name=\"\*\" minlevel=\"Off\" writeTo=\"seq\" \/>/{print NR}' /nethermind/NLog.config)
#sed -e "${LOG_LINE} i \ <logger name=\"JsonRpc\.\*\" final=\"true\"/>\\n" -i /nethermind/NLog.config
#sed -e "${LOG_LINE} i \ <logger name=\"JsonRpc\.\*\" minlevel=\"Warn\" writeTo=\"auto-colored-console-async\" final=\"true\"/>" -i /nethermind/NLog.config
#sed -e "${LOG_LINE} i \ <logger name=\"JsonRpc\.\*\" minlevel=\"Warn\" writeTo=\"file-async\" final=\"true\"\/>" -i /nethermind/NLog.config
# dasel 2.x syntax
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger' -v '{"-name":"JsonWebAPI.Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService","-maxlevel":"Error","-final":"true"}{"-name":"JsonWebAPI*","-minlevel":"Error","-writeTo":"file-async","-final":"true"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonWebAPI*","-minlevel":"Error","-writeTo":"auto-colored-console-async","-final":"true"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonWebAPI*","-final":"true"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonRpc.*","-minlevel":"Warn","-writeTo":"file-async","-final":"true"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonRpc.*","-minlevel":"Warn","-writeTo":"auto-colored-console-async","-final":"true"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonRpc.*","-final":"true"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"*","-minlevel":"Off","-writeTo":"seq"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"*","-minlevel":"Info","-writeTo":"file-async"}'
#dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"*","-minlevel":"Info","-writeTo":"auto-colored-console-async"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger' -v '{"-name":"JsonWebAPI.Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService","-maxlevel":"Error","-final":"true"}{"-name":"JsonWebAPI*","-minlevel":"Error","-writeTo":"file-async","-final":"true"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonWebAPI*","-minlevel":"Error","-writeTo":"auto-colored-console-async","-final":"true"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonWebAPI*","-final":"true"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonRpc.*","-minlevel":"Warn","-writeTo":"file-async","-final":"true"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonRpc.*","-minlevel":"Warn","-writeTo":"auto-colored-console-async","-final":"true"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"JsonRpc.*","-final":"true"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"*","-minlevel":"Off","-writeTo":"seq"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"*","-minlevel":"Info","-writeTo":"file-async"}'
dasel put -f /nethermind/NLog.config -r xml -w xml -t json 'nlog.rules.logger.[]' -v '{"-name":"*","-minlevel":"Info","-writeTo":"auto-colored-console-async"}'

if [ -n "${JWT_SECRET}" ]; then
echo -n "${JWT_SECRET}" > /var/lib/nethermind/ee-secret/jwtsecret
Expand Down
2 changes: 1 addition & 1 deletion nimbus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
wipe-db:
profiles: ["tools"]
restart: "no"
image: alpine:3
image: alpine:latest
user: "10002"
volumes:
- nimbus-data:/var/lib/nimbus
Expand Down
2 changes: 1 addition & 1 deletion teku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ services:
wipe-db:
profiles: ["tools"]
restart: "no"
image: alpine:3
image: alpine:latest
user: "10002"
volumes:
- teku-data:/var/lib/teku
Expand Down

0 comments on commit 8cbbeca

Please sign in to comment.