Adding Dockerfile
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM rust:alpine as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
|
||||
# This should fetch the index and cache it. This should reduce subsequent builds
|
||||
RUN cargo search test
|
||||
|
||||
COPY Cargo.toml Cargo.lock /app/
|
||||
# COPY .cargo /app/.cargo
|
||||
|
||||
COPY src /app/src
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM alpine
|
||||
|
||||
COPY --from=builder /app/target/release/rustocat /usr/bin/rustocat
|
||||
|
||||
ENTRYPOINT ["rustocat"]
|
||||
|
Reference in New Issue
Block a user