tilt: aptos multi-platform support

This commit is contained in:
Evan Gray 2024-12-10 09:01:10 -05:00 committed by Evan Gray
parent 6d56188b9d
commit 9299a1431c
3 changed files with 11 additions and 8 deletions

View File

@ -1,12 +1,15 @@
# first build the image
# build the image and tag it appropriately
<!-- cspell:disable-next-line -->
(cd ..; DOCKER_BUILDKIT=1 docker buildx build --platform linux/amd64 -f aptos/Dockerfile.base -t aptos .)
<!-- cspell:disable -->
# tag the image with the appropriate version
```bash
cd .. && docker buildx build --platform linux/amd64,linux/arm64 -f aptos/Dockerfile.base -t ghcr.io/wormhole-foundation/aptos:3.1.0 .
```
docker tag aptos:latest ghcr.io/wormhole-foundation/aptos:3.1.0
<!-- cspell:enable -->
# push to ghcr
```bash
docker push ghcr.io/wormhole-foundation/aptos:3.1.0
```

View File

@ -1,6 +1,6 @@
FROM cli-gen AS cli-export
FROM const-gen AS const-export
FROM ghcr.io/wormhole-foundation/aptos:3.1.0@sha256:c359f25cd6b2cd9edb2634504756a3b179cd416fd73fda59f66c48168e3b69da as aptos
FROM ghcr.io/wormhole-foundation/aptos:3.1.0@sha256:f66c2b5fea4a75050d051a5260ef643f52f5048d473877f1760be39d9e460d6b AS aptos
# Install nodejs
# todo(aki): move this into base image?

View File

@ -1,4 +1,4 @@
FROM rust:1.62@sha256:5777f201f507075309c4d2d1c1e8d8219e654ae1de154c844341050016a64a0c as aptos-node
FROM rust:1.62@sha256:2cd5c8517d0640bd287b2cfb4c0e62f1a8ed86174764d88280bc2a106d6835db AS aptos-node
RUN apt-get update && apt-get -y install libclang-dev libudev-dev libdw-dev jq cmake curl npm gcc g++ make lld
@ -11,5 +11,5 @@ WORKDIR /tmp/aptos-core
RUN git reset --hard 6f83bc6d02207298b2dee91133d75538789bf582
RUN cargo build -p aptos --profile cli
FROM rust:1.62@sha256:5777f201f507075309c4d2d1c1e8d8219e654ae1de154c844341050016a64a0c as export-stage
FROM rust:1.62@sha256:2cd5c8517d0640bd287b2cfb4c0e62f1a8ed86174764d88280bc2a106d6835db AS export-stage
COPY --from=aptos-node /tmp/aptos-core/target/cli/aptos /usr/local/cargo/bin/aptos