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

Add scrypto dev container target #2004

Merged
merged 6 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 2 additions & 2 deletions .github/workflows/ci-scrypto-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
tag: ${{ needs.tags.outputs.tag }}
context: "."
dockerfile: "Dockerfile"
target: "scrypto-builder"
platforms: "linux/amd64"
provenance: "false"
scan_image: true
Expand Down Expand Up @@ -74,8 +75,7 @@ jobs:

- uses: RDXWorks-actions/checkout@main
- name: Pull scrypto-builder docker image
run:
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker pull radixdlt/private-scrypto-builder:${{ needs.tags.outputs.tag }}
run: DOCKER_DEFAULT_PLATFORM=linux/amd64 docker pull radixdlt/private-scrypto-builder:${{ needs.tags.outputs.tag }}
- name: Build scrypto example using scrypto-builder
run: |
cp -r examples/everything test_package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-scrypto-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
tag: ${{ inputs.image-label }}
context: "."
dockerfile: "Dockerfile"
target: "scrypto-builder"
platforms: "linux/amd64"
provenance: "false"
scan_image: true
snyk_target_ref: ${{ github.ref_name }}
enable_dockerhub: true
secrets:
role_to_assume: ${{ secrets.DOCKERHUB_RELEASER_ROLE }}

18 changes: 17 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,23 @@ WORKDIR /app

RUN cargo install --path ./radix-clis

FROM base-image
# This dev-container image can be built with the following command:
# docker build . --target scrypto-dev-container -t scrypto-dev-container
FROM base-image AS scrypto-dev-container
RUN apt install -y curl bash-completion git
# Install improved prompt for better dev experience - https://starship.rs/
RUN curl -sS https://starship.rs/install.sh | sh -s -- -y
RUN echo 'eval "$(starship init bash)"\n . /etc/bash_completion' >> /root/.bashrc

COPY --from=builder /app/target/release/scrypto /usr/local/bin/scrypto
COPY --from=builder /app/target/release/resim /usr/local/bin/resim
azizi-a marked this conversation as resolved.
Show resolved Hide resolved
COPY --from=builder /app/target/release/rtmc /usr/local/bin/rtmc
COPY --from=builder /app/target/release/rtmd /usr/local/bin/rtmd
COPY --from=builder /app/target/release/scrypto-bindgen /usr/local/bin/scrypto-bindgen
RUN rustup target add wasm32-unknown-unknown
dhedey marked this conversation as resolved.
Show resolved Hide resolved
RUN rustup component add rustfmt
azizi-a marked this conversation as resolved.
Show resolved Hide resolved

FROM base-image AS scrypto-builder
COPY --from=builder /app/target/release/scrypto /usr/local/bin/scrypto
RUN rustup target add wasm32-unknown-unknown
WORKDIR /src
Expand Down
Loading