-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into haoyu/sindri_tokio
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target/ |
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,38 @@ | ||
name: Docker Build and Push | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push cloud Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: docker/Dockerfile.cloud | ||
push: true | ||
tags: scrolltech/sdk-cloud-prover:${{ github.ref_name }},scrolltech/sdk-cloud-prover:latest | ||
|
||
# - name: Build and push local Docker image | ||
# uses: docker/build-push-action@v4 | ||
# with: | ||
# context: . | ||
# file: docker/Dockerfile.local | ||
# push: true | ||
# tags: scrolltech/sdk-local-prover:${{ github.ref_name }},scrolltech/sdk-local-prover:latest |
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,23 @@ | ||
# Use the official Rust image as the base image | ||
FROM scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 as builder | ||
|
||
# Set the working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy the entire project | ||
COPY . . | ||
|
||
# Build the project | ||
RUN cargo build --release --example cloud | ||
|
||
# Create a new stage with a minimal Ubuntu image | ||
FROM ubuntu:20.04 | ||
|
||
# Install necessary dependencies | ||
RUN apt-get update && apt-get install -y libssl-dev && rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the built binary from the builder stage | ||
COPY --from=builder /usr/src/app/target/release/examples/cloud /usr/local/bin/cloud | ||
|
||
# Set the entrypoint | ||
ENTRYPOINT ["cloud"] |