-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Bump to the latest versions of each<hr>This is an automatic backport of pull request #3749 done by [Mergify](https://mergify.com). --------- Co-authored-by: Callum Waters <[email protected]>
- Loading branch information
1 parent
548e21a
commit d118a62
Showing
11 changed files
with
334 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Stage 1: generate celestia-appd binary | ||
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22.5-alpine3.19 as builder | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
ENV CGO_ENABLED=0 | ||
ENV GO111MODULE=on | ||
# hadolint ignore=DL3018 | ||
RUN apk update && apk add --no-cache \ | ||
gcc \ | ||
git \ | ||
# linux-headers are needed for Ledger support | ||
linux-headers \ | ||
make \ | ||
musl-dev | ||
COPY . /celestia-app | ||
WORKDIR /celestia-app | ||
# we need the celestia-appd build as we might want to create an account | ||
# internally for txsimulation | ||
RUN uname -a &&\ | ||
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ | ||
make build && make txsim-build | ||
|
||
# Stage 2: create a minimal image with the binary | ||
FROM docker.io/alpine:3.20 | ||
|
||
# Use UID 10,001 because UIDs below 10,000 are a security risk. | ||
# Ref: https://github.com/hexops/dockerfile/blob/main/README.md#do-not-use-a-uid-below-10000 | ||
ARG UID=10001 | ||
ARG USER_NAME=celestia | ||
|
||
ENV CELESTIA_HOME=/home/${USER_NAME} | ||
|
||
# hadolint ignore=DL3018 | ||
RUN apk update && apk add --no-cache \ | ||
bash \ | ||
curl \ | ||
jq \ | ||
# Creates a user with $UID and $GID=$UID | ||
&& adduser ${USER_NAME} \ | ||
-D \ | ||
-g ${USER_NAME} \ | ||
-h ${CELESTIA_HOME} \ | ||
-s /sbin/nologin \ | ||
-u ${UID} | ||
|
||
# Copy in the celestia-appd binary | ||
COPY --from=builder /celestia-app/build/celestia-appd /bin/celestia-appd | ||
COPY --from=builder /celestia-app/build/txsim /bin/txsim | ||
|
||
COPY --chown=${USER_NAME}:${USER_NAME} docker/txsim.sh /opt/entrypoint.sh | ||
|
||
USER ${USER_NAME} | ||
|
||
# Set the working directory to the home directory. | ||
WORKDIR ${CELESTIA_HOME} | ||
|
||
# grpc, rpc, api ports | ||
EXPOSE 26657 1317 9090 | ||
|
||
ENTRYPOINT [ "/bin/bash", "/opt/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
go 1.22.5 | ||
|
||
use ( | ||
. | ||
./test/interchain | ||
) |
Oops, something went wrong.