This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM alpine:latest AS base
|
||||
|
||||
FROM alpine:latest AS build
|
||||
RUN --mount=type=cache,target=/var/cache/apk apk update
|
||||
RUN --mount=type=cache,target=/var/cache/apk apk add rustup binutils gcc musl-dev linux-headers
|
||||
RUN adduser -D luser
|
||||
USER luser
|
||||
WORKDIR /home/luser
|
||||
RUN rustup-init -y --profile minimal --target x86_64-unknown-linux-musl
|
||||
ADD --chown=luser:users . .
|
||||
RUN source $HOME/.cargo/env && cargo build --release --target x86_64-unknown-linux-musl
|
||||
|
||||
|
||||
FROM scratch AS release
|
||||
COPY --from=build --chown=9999:9999 /home/luser/target/x86_64-unknown-linux-musl/release/intrasys /usr/local/bin/intrasys
|
||||
USER 9999
|
||||
ENTRYPOINT ["/usr/local/bin/intrasys"]
|
||||
ENV INTRASYS_HOST="0.0.0.0"
|
||||
EXPOSE 8080/tcp
|
Reference in New Issue
Block a user