initial commit
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Has been cancelled
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Has been cancelled
This commit is contained in:
commit
5a616ff2a3
4 changed files with 65 additions and 0 deletions
39
Containerfile
Normal file
39
Containerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM docker.io/rust:1-alpine3.20 AS builder
|
||||
|
||||
RUN apk --no-cache add \
|
||||
git \
|
||||
protoc \
|
||||
protobuf-dev \
|
||||
musl-dev
|
||||
|
||||
ENV CARGO_CARGO_NEW_VCS="none"
|
||||
ENV CARGO_BUILD_RUSTFLAGS="-C target-feature=+crt-static"
|
||||
|
||||
RUN echo "atuin:x:2222:2222:Linux User,,,:/atuin:/atuin" > /passwd
|
||||
RUN mkdir /atuin
|
||||
|
||||
ENV VERSION=v18.3.0
|
||||
|
||||
RUN git clone https://github.com/atuinsh/atuin.git /work
|
||||
WORKDIR /work
|
||||
RUN git checkout $VERSION
|
||||
|
||||
RUN cargo build --release --target=$(arch)-unknown-linux-musl
|
||||
RUN cp "./target/$(arch)-unknown-linux-musl/release/atuin" /app
|
||||
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder --chown=2222:2222 /atuin /atuin
|
||||
COPY --from=builder /passwd /etc/passwd
|
||||
|
||||
ENV ATUIN_HOST="0.0.0.0"
|
||||
ENV ATUIN_PORT=8888
|
||||
ENV ATUIN_OPEN_REGISTRATION=true
|
||||
ENV RUST_LOG=info,atuin_server=debug
|
||||
|
||||
USER atuin
|
||||
COPY --from=builder /app /app
|
||||
CMD ["/app", "server", "start"]
|
||||
|
||||
EXPOSE 8888
|
Loading…
Add table
Add a link
Reference in a new issue