2019-08-26 14:26:42 +00:00
|
|
|
# Builder image
|
2022-02-22 16:37:27 +00:00
|
|
|
# Keep go version in sync with Build GA job.
|
2024-11-29 11:15:24 +00:00
|
|
|
FROM golang:1.23-alpine AS builder
|
2022-02-22 16:37:27 +00:00
|
|
|
|
|
|
|
# Display go version for information purposes.
|
|
|
|
RUN go version
|
2018-04-16 08:41:23 +00:00
|
|
|
|
2019-08-26 14:26:42 +00:00
|
|
|
RUN set -x \
|
2021-05-13 14:16:27 +00:00
|
|
|
&& apk add --no-cache git make \
|
2019-08-26 14:26:42 +00:00
|
|
|
&& mkdir -p /tmp
|
|
|
|
|
|
|
|
COPY . /neo-go
|
|
|
|
|
|
|
|
WORKDIR /neo-go
|
|
|
|
|
|
|
|
ARG REPO=repository
|
|
|
|
ARG VERSION=dev
|
2018-04-16 08:41:23 +00:00
|
|
|
|
2022-07-21 15:20:46 +00:00
|
|
|
RUN VERSION=$VERSION REPO=$REPO make build
|
2019-08-26 14:26:42 +00:00
|
|
|
|
|
|
|
# Executable image
|
2019-11-29 10:36:05 +00:00
|
|
|
FROM alpine
|
2019-08-26 14:26:42 +00:00
|
|
|
|
2022-07-21 15:20:46 +00:00
|
|
|
ARG VERSION=dev
|
2018-04-16 08:41:23 +00:00
|
|
|
LABEL version=$VERSION
|
|
|
|
|
2019-08-26 14:26:42 +00:00
|
|
|
WORKDIR /
|
|
|
|
|
2019-11-15 17:41:40 +00:00
|
|
|
COPY --from=builder /neo-go/config /config
|
2019-11-29 10:36:05 +00:00
|
|
|
COPY --from=builder /neo-go/.docker/privnet-entrypoint.sh /usr/bin/privnet-entrypoint.sh
|
2021-05-13 14:16:27 +00:00
|
|
|
COPY --from=builder /neo-go/bin/neo-go /usr/bin/neo-go
|
2019-08-26 14:26:42 +00:00
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
2018-04-16 08:41:23 +00:00
|
|
|
|
2019-11-29 10:36:05 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/privnet-entrypoint.sh"]
|
2018-04-16 08:41:23 +00:00
|
|
|
|
2019-11-29 10:36:05 +00:00
|
|
|
CMD ["node", "--config-path", "/config", "--privnet"]
|