Skip to content

Commit

Permalink
Add default CMD
Browse files Browse the repository at this point in the history
  • Loading branch information
hsoerensen committed Aug 11, 2024
1 parent 4c108ef commit 4a1b497
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
File renamed without changes.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ ARG BASE_ALGORAND_VERSION="3.23.1"
ARG TARGETPLATFORM
FROM algorand/stable:${BASE_ALGORAND_VERSION} AS algorand

FROM --platform=$BUILDPLATFORM golang:1.22 AS builder
FROM golang:1.22 AS builder
WORKDIR /
COPY ./tools/ /tools
COPY Makefile /
COPY go.mod /

RUN echo "Building for $TARGETPLATFORM"
RUN GOOS=linux GOARCH=$(echo $TARGETPLATFORM | cut -d'/' -f2) make all
RUN make all

FROM gcr.io/distroless/cc AS distroless
ENV TELEMETRY_NAME="${HOSTNAME}"
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.legacy-relay
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ FROM gcr.io/distroless/cc AS distroless
COPY --from=algorand --chown=0:0 /root/node/algod /node/algod
COPY --from=algorand --chown=0:0 /root/node/goal /node/goal
COPY --from=algorand --chown=0:0 /root/node/node_exporter /node/node_exporter

ARG NETWORK="testnet"
COPY configuration/${NETWORK}/genesis.json /node/data/genesis.json

CMD ["/node/algod"]
5 changes: 2 additions & 3 deletions Dockerfile.participation
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ ARG BASE_ALGORAND_VERSION="3.23.1"
ARG TARGETPLATFORM
FROM algorand/algod:${BASE_ALGORAND_VERSION}-stable AS algorand

FROM --platform=$BUILDPLATFORM golang:1.22 AS builder
FROM golang:1.22 AS builder
WORKDIR /
COPY ./tools/ /tools
COPY Makefile /
COPY go.mod /

RUN echo "Building for $TARGETPLATFORM"
RUN GOOS=linux GOARCH=$(echo $TARGETPLATFORM | cut -d'/' -f2) make all
RUN make all

FROM ubuntu:22.04
ENV TELEMETRY_NAME="${HOSTNAME}"
Expand Down
2 changes: 1 addition & 1 deletion tools/catch-catchpoint/catch-catchpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func main() {
if (lastNodeRound) > lastNetworkRound-1000 {
log.Print("Current round is not that far behind (if at all), skipping catchup")
return
} else if catchpointRound < lastNodeRound-1000 {
} else if catchpointRound <= lastNodeRound-1000 {
log.Print("Catchpoint round is behind the network, skipping catchup")
return
}
Expand Down

0 comments on commit 4a1b497

Please sign in to comment.