-
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.
Builds a Debian Bookworm (slim) docker container with Admarus pre-built inside it, and the OpenSSL dynamic libraries. Run with: ```sh docker run --network=host ghcr.io/Mubelotix/admarus:master \ --ipfs-rpc=http://host.docker.internal:5001 \ --external-addrs=/ip4/$(curl -s https://api.ipify.org)/tcp/4002 \ --external-addrs=/ip6/$(curl -s https://api64.ipify.org)/tcp/4002 \ ``` fixes #97
- Loading branch information
1 parent
f6156b2
commit 25f8732
Showing
2 changed files
with
69 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,46 @@ | ||
name: Publish container | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 @@ | ||
FROM rust:1-slim-bookworm as build | ||
|
||
RUN apt-get update && apt-get install -y pkg-config libssl-dev && apt-get clean | ||
|
||
WORKDIR /usr/src/admarus | ||
COPY . . | ||
|
||
RUN cd daemon && \ | ||
cargo build --release && \ | ||
mv ../target/release/admarusd /usr/local/bin/admarusd && \ | ||
cd ../../ && \ | ||
rm -rf admarus | ||
|
||
FROM debian:bookworm-slim | ||
|
||
RUN apt-get update && apt-get install -y libssl ca-certificates && apt-get clean | ||
|
||
COPY --from=build /usr/local/bin/admarusd /usr/local/bin/admarusd | ||
|
||
EXPOSE 4002 | ||
EXPOSE 5002 | ||
|
||
ENTRYPOINT ["/usr/local/bin/admarusd"] |