2023-06-06 20:27:49 +00:00
|
|
|
VERSION 0.7
|
|
|
|
FROM rust:alpine
|
|
|
|
WORKDIR /rustbuild
|
|
|
|
|
|
|
|
prepare-env:
|
|
|
|
RUN apk add --no-cache musl-dev libssl3 openssl-dev
|
|
|
|
RUN cargo search test # Super simple way to cache the cargo index
|
|
|
|
|
|
|
|
docker-multi:
|
|
|
|
BUILD --platform linux/amd64 --platform linux/arm64 +docker
|
|
|
|
|
|
|
|
build:
|
|
|
|
FROM +prepare-env
|
|
|
|
COPY . .
|
|
|
|
RUN cargo build --release
|
|
|
|
SAVE ARTIFACT target/release/rustocat rustocat
|
|
|
|
|
|
|
|
docker:
|
|
|
|
FROM alpine
|
|
|
|
RUN apk add --no-cache libssl3
|
|
|
|
COPY +build/rustocat rustocat
|
2023-06-07 06:07:40 +00:00
|
|
|
ENTRYPOINT ["rustocat"]
|
2023-06-06 20:27:49 +00:00
|
|
|
ARG EARTHLY_TARGET_TAG
|
|
|
|
ARG TAG=$EARTHLY_TARGET_TAG
|
2023-06-07 06:07:40 +00:00
|
|
|
SAVE IMAGE --push docker.hibas123.de/rustocat:$TAG
|