ARM docker image build

This commit is contained in:
Gabriel Simmer 2023-07-16 10:49:16 +01:00
parent 51ee4e5638
commit d3aaa38768
Signed by: arch
GPG key ID: C81B106D46C5B875
3 changed files with 47 additions and 0 deletions

10
.dockerignore Normal file
View file

@ -0,0 +1,10 @@
.direnv/
result
result/
target/
.git
screenshot.png
README.md
.envrc
flake.*
theme.css

View file

@ -0,0 +1,20 @@
name: Build Docker Image
on:
push:
branches:
- trunk
jobs:
arm-docker-build:
runs-on: arm
steps:
- name: Check out repository
uses: https://github.com/RouxAntoine/checkout@v3.5.4
with:
ref: trunk
- name: Build and Push ARM Image
uses: https://github.com/docker/build-push-action
with:
push: true
tags: icr.gmem.ca/dref:arm

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM rust:latest AS builder
RUN apt update && apt install -y musl-tools musl-dev
RUN update-ca-certificates
WORKDIR /dref
COPY ./ .
RUN cargo build --release
FROM scratch
WORKDIR /dref
COPY --from=builder /dref/target/release/docker-rs-dashboard ./dref
CMD ["/dref/dref"]