Skip to content

Commit

Permalink
Update go version in Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <eric.warehime@gmail.com>
  • Loading branch information
Eric-Warehime committed Mar 12, 2024
1 parent ba27204 commit 32afd64
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions protocol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NB: This is a digest for a multi-arch manifest list, you will want to get this by running
# `docker buildx imagetools inspect golang:1.21-alpine`
ARG GOLANG_1_21_ALPINE_DIGEST="926f7f7e1ab8509b4e91d5ec6d5916ebb45155b0c8920291ba9f361d65385806"
ARG GOLANG_1_22_ALPINE_DIGEST="8e96e6cff6a388c2f70f5f662b64120941fcd7d4b89d62fec87520323a316bd9"

# This Dockerfile is a stateless build of the `dydxprotocold` binary as a Docker container.
# It does not include any configuration, state, or genesis information.
Expand All @@ -9,7 +9,7 @@ ARG GOLANG_1_21_ALPINE_DIGEST="926f7f7e1ab8509b4e91d5ec6d5916ebb45155b0c8920291b
# Builder
# --------------------------------------------------------

FROM golang@sha256:${GOLANG_1_21_ALPINE_DIGEST} as builder
FROM golang@sha256:${GOLANG_1_22_ALPINE_DIGEST} as builder
ARG VERSION
ARG COMMIT

Expand Down Expand Up @@ -41,15 +41,24 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
-o /dydxprotocol/build/ \
./...

# Build the oracle binary
WORKDIR /
RUN git clone https://github.com/skip-mev/slinky.git
WORKDIR /slinky
RUN make build

# --------------------------------------------------------
# Runner
# --------------------------------------------------------

FROM golang@sha256:${GOLANG_1_21_ALPINE_DIGEST}
FROM golang@sha256:${GOLANG_1_22_ALPINE_DIGEST}

RUN apk add --no-cache bash

COPY --from=builder /dydxprotocol/build/dydxprotocold /bin/dydxprotocold
COPY --from=builder /slinky/build/oracle /bin/slinky
COPY --from=builder /slinky/config/local/oracle.json /etc/oracle.json
COPY --from=builder /slinky/config/local/market.json /etc/market.json

ENV HOME /dydxprotocol
WORKDIR $HOME
Expand Down

0 comments on commit 32afd64

Please sign in to comment.