Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build aptos devnet #3

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- main

env:
APTOS_GIT_REVISION: ee0d090 # devnet branch
APTOS_GIT_REVISION: 7dc7078

concurrency: docker

Expand Down
17 changes: 16 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN git clone https://github.com/aptos-labs/aptos-core.git . && \
RUN ./scripts/dev_setup.sh -t -b -p
RUN source ~/.profile && \
cargo build --locked --release --bin aptos
RUN source ~/.profile && \
cargo build --locked --release --package aptos-node

FROM ubuntu:22.04 AS base

Expand All @@ -36,7 +38,20 @@ COPY --from=builder \
USER aptos
WORKDIR /aptos

FROM base AS aptos-node

COPY --from=builder \
/usr/src/aptos/target/release/aptos-node \
/usr/local/bin/

COPY --from=builder \
/usr/lib/* \
/usr/lib/

USER aptos
WORKDIR /aptos

EXPOSE 8080
EXPOSE 9102

ENTRYPOINT ["aptos", "node", "run-local-testnet"]
ENTRYPOINT ["aptos-node"]
32 changes: 23 additions & 9 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,45 @@ function "cache_multi_platform" {

# Single-platform targets.
# Requires creating multi-platform manifest list manually.
target "aptos" {
target "aptos-node" {
platforms = [PLATFORM]
target = "aptos"
target = "aptos-node"
output = ["type=image"]
args = {
APTOS_GIT_REVISION = APTOS_GIT_REVISION
}
tags = tags("aptos-node")
cache-from = [cache("aptos-node")] # always merged with children's cache-from
cache-to = ["${cache("aptos-node")},mode=max"]
}

target "aptos" {
inherits = ["aptos-node"]
target = "aptos"
tags = tags("aptos")
cache-from = [cache("aptos")] # always merged with children's cache-from
cache-to = ["${cache("aptos")},mode=max"]
# Sharing the same cache with aptos-node
}

target "default" {
inherits = ["aptos"]
inherits = ["aptos-node"]
}

# Multi-platform targets.
target "aptos-multi-platform" {
target "aptos-node-multi-platform" {
platforms = ["linux/amd64", "linux/arm64"]
target = "aptos"
target = "aptos-node"
output = ["type=image"]
args = {
APTOS_GIT_REVISION = APTOS_GIT_REVISION
}
tags = tags_multi_platform("aptos-node")
cache-from = [cache_multi_platform("aptos-node")] # always merged with children's cache-from
cache-to = ["${cache_multi_platform("aptos-node")},mode=max"]
}

target "aptos-multi-platform" {
inherits = ["aptos-node-multi-platform"]
target = "aptos"
tags = tags_multi_platform("aptos")
cache-from = [cache_multi_platform("aptos")] # always merged with children's cache-from
cache-to = ["${cache_multi_platform("aptos")},mode=max"]
# Sharing the same cache with aptos-node
}
Loading