mirror of https://github.com/chipsenkbeil/distant
Minor documentation changes and update dockerfile to build from source
parent
baee1e2bfa
commit
65453d3f18
@ -1,13 +1,13 @@
|
|||||||
FROM alpine:3
|
FROM rust:alpine AS builder
|
||||||
|
# make & perl needed for openssl vendor build
|
||||||
# Install curl so we can download the distant binary
|
# musl-dev needed, otherwise crti.o is missing
|
||||||
RUN apk add --no-cache curl
|
RUN apk add --no-cache make musl-dev perl
|
||||||
|
WORKDIR /usr/src/distant
|
||||||
# 1. Specify the distant version
|
COPY . .
|
||||||
# 2. Download the MUSL artifact as alpine uses musl
|
# NOTE: For musl clients, there is a bug with wezterm-ssh's libssh-rs that
|
||||||
# 3. Make the binary executable
|
# prevents us from linking to it; so, we have to exclude it for musl
|
||||||
ARG distant_version=0.16.4
|
RUN cargo build --release --no-default-features --features ssh2
|
||||||
ARG distant_url=https://github.com/chipsenkbeil/distant/releases/download/v${distant_version}/distant-linux64-musl
|
|
||||||
RUN curl -L ${distant_url} > /usr/local/bin/distant && chmod +x /usr/local/bin/distant
|
|
||||||
|
|
||||||
|
FROM alpine:3
|
||||||
|
COPY --from=builder /usr/src/distant/target/release/distant /usr/local/bin/distant
|
||||||
ENTRYPOINT ["/usr/local/bin/distant"]
|
ENTRYPOINT ["/usr/local/bin/distant"]
|
||||||
|
Loading…
Reference in New Issue