Skip to content

Commit bc4cc1a

Browse files
authored
fix-dkg-crash-on-startup
Simplify Dockerfile by removing build stage
2 parents 3378a5a + 05371bd commit bc4cc1a

1 file changed

Lines changed: 3 additions & 19 deletions

File tree

‎dkg/Dockerfile‎

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
# Build stage
2-
FROM alpine:3.21 as build
3-
41
ARG DKG_UPSTREAM_VERSION
2+
FROM ssvlabs/ssv-dkg:${DKG_UPSTREAM_VERSION} as base
53

6-
WORKDIR /
7-
RUN cd /
8-
9-
# Install curl and zip
10-
RUN apk update
11-
RUN apk add --no-cache curl zip
12-
13-
# Download given version from Github and unzip
14-
RUN curl -L -o /ssv-dkg.zip https://github.com/ssvlabs/ssv-dkg/releases/download/${DKG_UPSTREAM_VERSION}/ssvdkg-${DKG_UPSTREAM_VERSION}-linux-$(uname -m | sed -e 's/aarch64/arm64/g' -e 's/x86_64/amd64/g').zip
15-
RUN unzip -j /ssv-dkg.zip
16-
17-
# Final stage
18-
FROM alpine:3.21
19-
20-
# Copy the built binary from the previous stage/build context
21-
COPY --from=build /ssv-dkg /bin/ssv-dkg
4+
FROM base
225

236
WORKDIR /
247

@@ -31,6 +14,7 @@ RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/co
3114

3215
COPY dkg-config.yml /ssv-dkg/config/dkg-config.yml
3316
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
17+
RUN chmod +x /usr/local/bin/entrypoint.sh
3418

3519
ENV DKG_PORT=${DKG_PORT} \
3620
DKG_DATA_DIR=/data/dkg \

0 commit comments

Comments
 (0)