forked from autonity/autonity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 819 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Support setting various labels on the final image
ARG COMMIT=""
ARG VERSION=""
ARG BUILDNUM=""
# Build Autonity in a stock Go builder container
FROM golang:1.21-alpine as builder
LABEL org.opencontainers.image.source https://github.com/autonity/autonity
RUN apk add --no-cache make gcc musl-dev linux-headers libc-dev git perl-utils
ADD . /autonity
RUN cd /autonity && make autonity-docker
# Pull Autonity into a second stage deploy alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /autonity/build/bin/autonity /usr/local/bin/
EXPOSE 8545 8546 8547 30303 30303/udp
ENTRYPOINT ["autonity"]
# Add some metadata labels to help programatic image consumption
ARG COMMIT=""
ARG VERSION=""
ARG BUILDNUM=""
LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"