Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

use of standard keymanager API #34

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
ARG UPSTREAM_VERSION

###########
# BUILDER #
###########
# Get jq binaries (curl is already in the consensys image)
FROM debian:bullseye-slim as builder
RUN apt update && apt install cron jq --yes
FROM golang:1.16.15-alpine3.15 as builder
WORKDIR /app
RUN apk update && apk add git && git clone https://github.com/dappnode/eth2-pubkeys-autocheck.git
WORKDIR /app/eth2-pubkeys-autocheck/build
RUN go build -o auto-check-remote-keys main.go

########
# TEKU #
Expand All @@ -17,20 +16,10 @@ FROM consensys/teku:$UPSTREAM_VERSION
COPY --from=builder /usr/bin/jq /usr/bin/jq
COPY --from=builder /usr/lib/x86_64-linux-gnu/libjq* /usr/lib/x86_64-linux-gnu/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libonig* /usr/lib/x86_64-linux-gnu/
# Copy crontab and cron binary
COPY --from=builder /usr/sbin/cron /usr/sbin/cron
COPY --from=builder /usr/bin/crontab /usr/bin/crontab
COPY --from=builder /var/spool/cron /var/spool/cron

# Setup cronjob
COPY get-keys-cron /etc/cron.d/
COPY get-keys.sh /usr/local/bin/get-keys.sh
# Apply cron job
RUN crontab /etc/cron.d/get-keys-cron


ENV JAVA_OPTS="-Xmx4g"

COPY --from=builder /app/build/auto-check-remote-keys /usr/local/bin/auto-check-remote-keys
COPY entrypoint.sh /usr/bin/entrypoint.sh

# API port: https://docs.teku.consensys.net/en/latest/Reference/CLI/CLI-Syntax/#rest-api-port
Expand Down
2 changes: 1 addition & 1 deletion build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if [ ! -z "${PUBLIC_KEYS_API}" ]; then
fi

echo "${INFO} starting cronjob"
cron
CLIENT_ADDRESS=http://teku-prater.dappnode CLIENT_PORT=9000 NETWORK=prater auto-check-remote-keys &

# Concatenate EXTRA_OPTS string
[ ! -z "$INITIAL_STATE" ] && EXTRA_OPTS="${EXTRA_OPTS} --initial-state=${INITIAL_STATE}"
Expand Down
2 changes: 0 additions & 2 deletions build/get-keys-cron

This file was deleted.

92 changes: 0 additions & 92 deletions build/get-keys.sh

This file was deleted.