Skip to content

Commit d689e3b

Browse files
committed
chore: add docker image build and publish workflow
1 parent 2f8d0e9 commit d689e3b

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.git
2+
.github
3+
target
4+
ui/node_modules
5+
ui/target
6+
ui/dist
7+
ui/.dioxus
8+
**/*.log
9+
**/*.tmp
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
release:
9+
types:
10+
- published
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
jobs:
17+
publish:
18+
uses: datum-cloud/actions/.github/workflows/publish-docker.yaml@v1
19+
with:
20+
image-name: datum-iroh-gateway
21+
secrets: inherit

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM rust:1.88-bookworm AS builder
2+
3+
WORKDIR /app
4+
5+
COPY . .
6+
7+
RUN cargo build -p datum-connect --release
8+
9+
FROM debian:bookworm-slim
10+
11+
RUN apt-get update \
12+
&& apt-get install -y --no-install-recommends ca-certificates \
13+
&& rm -rf /var/lib/apt/lists/* \
14+
&& useradd -u 65532 -r -s /usr/sbin/nologin datum
15+
16+
COPY --from=builder /app/target/release/datum-connect /usr/local/bin/datum-connect
17+
18+
USER 65532:65532
19+
20+
ENTRYPOINT ["/usr/local/bin/datum-connect"]
21+
CMD ["gateway"]

0 commit comments

Comments
 (0)