Skip to content

Commit 60d8744

Browse files
committed
feat: added backoffice cli docker image
1 parent 72e0b2c commit 60d8744

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/build.yml

+27
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,33 @@ jobs:
4949
steps:
5050
- uses: actions/[email protected]
5151

52+
- name: Login to GitHub Container Registry
53+
uses: docker/login-action@v1
54+
with:
55+
registry: ghcr.io
56+
username: ${{ github.actor }}
57+
password: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Build and push
60+
uses: docker/build-push-action@v2
61+
with:
62+
context: ${{ matrix.context }}
63+
file: ${{ matrix.file }}
64+
platforms: linux/amd64
65+
push: true
66+
tags: ghcr.io/${{ matrix.endpoint }},ghcr.io/${{ matrix.endpoint }}:${{ github.sha }}
67+
backoffice:
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
include:
72+
- context: .
73+
file: docker/dockerfile.backoffice
74+
endpoint: demeter-run/fabric-backoffice
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/[email protected]
78+
5279
- name: Login to GitHub Container Registry
5380
uses: docker/login-action@v1
5481
with:

docker/dockerfile.backoffice

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM rust:1.79-slim-buster AS build
2+
3+
WORKDIR /app
4+
5+
RUN apt update
6+
RUN apt install -y build-essential pkg-config libssl-dev libsasl2-dev cmake
7+
8+
COPY ./Cargo.toml ./Cargo.toml
9+
COPY . .
10+
11+
RUN cargo build --release --bin=cli
12+
13+
FROM rust:1.79-slim-buster
14+
15+
RUN apt update
16+
RUN apt install -y libssl-dev libsasl2-dev
17+
18+
COPY --from=build /app/target/release/cli .
19+
20+
ENTRYPOINT ["./cli"]

0 commit comments

Comments
 (0)