Skip to content

Commit

Permalink
New Docker Builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ancient123 committed Oct 16, 2023
1 parent 5126a0c commit 7a34e9e
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 193 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,73 @@ jobs:
target/debug/examples/web-server
target/debug/examples/web-server-da-orchestrator
target/debug/examples/web-server-da-validator
build-dockers:
strategy:
matrix:
just_variants:
- async_std
- tokio
runs-on: ubuntu-latest
needs: [build, build-arm]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Docker BuildKit (buildx)
uses: docker/setup-buildx-action@v3

- name: Login to Github Container Repo
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download executables AMD
uses: actions/download-artifact@v3
with:
name: binaries-amd64-${{ matrix.just_variants }}
path: target/amd64/debug

- name: Download executables ARM
uses: actions/download-artifact@v3
with:
name: binaries-aarch64-${{ matrix.just_variants }}
path: target/arm64/debug

- name: Generate webserver docker metadata
uses: docker/metadata-action@v5
id: webserver
with:
images: ghcr.io/espressosystems/hotshot/webserver
flavor: suffix=-${{ matrix.just_variants }}

- name: Generate libp2p metadata
uses: docker/metadata-action@v5
id: libp2p
with:
images: ghcr.io/espressosystems/hotshot/libp2p
flavor: suffix=-${{ matrix.just_variants }}

- name: Build and push webserver docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/validator-webserver.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.webserver.outputs.tags }}
labels: ${{ steps.webserver.outputs.labels }}

- name: Build and push web-server docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/validator-libp2p.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.libp2p.outputs.tags }}
labels: ${{ steps.libp2p.outputs.labels }}

55 changes: 0 additions & 55 deletions deploy/Dockerfile

This file was deleted.

57 changes: 0 additions & 57 deletions deploy/Dockerfile-Static

This file was deleted.

16 changes: 0 additions & 16 deletions deploy/centralized_server_benchmark_client.Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions deploy/multi-machine-centralized.Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions deploy/multi-machine-vrf-centralized.Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions deploy/multi-machine-web.Dockerfile

This file was deleted.

13 changes: 13 additions & 0 deletions deploy/validator-libp2p.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:jammy

ARG TARGETARCH

COPY ./target/$TARGETARCH/debug/examples/validator-libp2p /usr/local/bin/validator-libp2p

# logging
ENV RUST_LOG="warn"

# log format. JSON no ansi
ENV RUST_LOG_FORMAT="json"

ENTRYPOINT ["validator-libp2p"]
13 changes: 13 additions & 0 deletions deploy/validator-webserver.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:jammy

ARG TARGETARCH

COPY ./target/$TARGETARCH/debug/examples/validator-webserver /usr/local/bin/validator-webserver

# logging
ENV RUST_LOG="warn"

# log format. JSON no ansi
ENV RUST_LOG_FORMAT="json"

ENTRYPOINT ["validator-webserver"]
8 changes: 0 additions & 8 deletions deploy/web-server.Dockerfile

This file was deleted.

0 comments on commit 7a34e9e

Please sign in to comment.