-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.release
More file actions
28 lines (23 loc) · 863 Bytes
/
Copy pathDockerfile.release
File metadata and controls
28 lines (23 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM debian:bookworm-slim
ARG NOVUS_VERSION=v0.2.3
ARG NOVUS_TARGET=linux/arm64
ARG NOVUS_OUTPUT_DIR=linux_arm64
ARG NOVUS_BINARY_NAME=nox-linux-arm64
RUN apt-get update && apt-get install -y --no-install-recommends \
binutils \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN arch="$(dpkg --print-architecture)" \
&& case "$arch" in \
amd64) novus_bin="novus-linux-amd64" ;; \
arm64) novus_bin="novus-linux-arm64" ;; \
*) echo "unsupported builder architecture: $arch" >&2; exit 1 ;; \
esac \
&& curl -fsSL -o /usr/local/bin/novus "https://github.com/MJDaws0n/novus/releases/download/${NOVUS_VERSION}/${novus_bin}" \
&& chmod +x /usr/local/bin/novus
WORKDIR /src
COPY . .
RUN mkdir -p /out \
&& novus --target="${NOVUS_TARGET}" main.nov \
&& cp "build/${NOVUS_OUTPUT_DIR}/nox" "/out/${NOVUS_BINARY_NAME}"