Minor documentation changes and update dockerfile to build from source

pull/118/head
Chip Senkbeil 2 years ago
parent baee1e2bfa
commit 65453d3f18
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

@ -1,5 +1,10 @@
# Building from Source # Building from Source
## Dependencies
* `make` - needed to build openssl via vendor feature
* `perl` - needed to build openssl via vendor feature
## Using Cargo ## Using Cargo
A debug build is straightforward: A debug build is straightforward:

@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.16.4] - 2022-06-01 ## [0.16.4] - 2022-06-01
### Added ### Added
- Dockerfile using Alpine linux with a basic install of distant, tagged as - Dockerfile using Alpine linux with a basic install of distant, tagged as
`chipsenkbeil/distant:0.16.3` `chipsenkbeil/distant:0.16.3` and `chipsenkbeil/distant:0.16.4`
### Fixed ### Fixed
- [Issue #90](https://github.com/chipsenkbeil/distant/issues/90) - [Issue #90](https://github.com/chipsenkbeil/distant/issues/90)

@ -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…
Cancel
Save