1# syntax=docker/dockerfile:1
2
3ARG BASE_IMAGE
4FROM ${BASE_IMAGE}
5WORKDIR /app
6ARG TZ=Etc/UTC \
7 LANG=C.UTF-8 \
8 LC_ALL=C.UTF-8 \
9 DEBIAN_FRONTEND=noninteractive
10ENV CARGO_TERM_COLOR=always
11
12COPY script/linux script/
13RUN ./script/linux
14COPY script/install-cmake script/
15RUN ./script/install-cmake "3.30.4"
16
17COPY . .
18
19# When debugging, make these into individual RUN statements.
20# Cleanup to avoid saving big layers we aren't going to use.
21RUN . "$HOME/.cargo/env" \
22 && cargo fetch \
23 && cargo build \
24 && cargo run -- --help \
25 && cargo clean --quiet