mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-24 18:10:56 -05:00
New dockerfile for #427. Builds on demand
This commit is contained in:
parent
05773fe815
commit
fa9bfdf8b1
2 changed files with 10 additions and 8 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
Dockerfile
|
16
Dockerfile
16
Dockerfile
|
@ -1,8 +1,8 @@
|
||||||
FROM ubuntu:20.04
|
FROM rust:1.58.1 as builder
|
||||||
ARG VERSION=1.4.0
|
WORKDIR /usr/src/typos
|
||||||
ENV VERSION=${VERSION}
|
COPY . .
|
||||||
RUN apt-get update && apt-get install -y wget
|
RUN cargo install --path .
|
||||||
RUN wget https://github.com/crate-ci/typos/releases/download/v${VERSION}/typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz && \
|
|
||||||
tar -xzvf typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz && \
|
FROM debian:buster-slim
|
||||||
mv typos /usr/local/bin
|
COPY --from=builder /usr/local/cargo/bin/typos /usr/local/bin/typos
|
||||||
ENTRYPOINT ["/usr/local/bin/typos"]
|
CMD ["typos"]
|
||||||
|
|
Loading…
Reference in a new issue