Skip to content

Commit

Permalink
New dockerfile for crate-ci#427. Builds on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
halkeye committed Feb 11, 2022
1 parent 05773fe commit fa9bfdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
Dockerfile
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:20.04
ARG VERSION=1.4.0
ENV VERSION=${VERSION}
RUN apt-get update && apt-get install -y wget
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 && \
mv typos /usr/local/bin
ENTRYPOINT ["/usr/local/bin/typos"]
FROM rust:1.58.1 as builder
WORKDIR /usr/src/typos
COPY . .
RUN cargo install --path .

FROM debian:buster-slim
COPY --from=builder /usr/local/cargo/bin/typos /usr/local/bin/typos
CMD ["typos"]

0 comments on commit fa9bfdf

Please sign in to comment.