From 14f3ccc1f6db7b99485b462ba84f30dcc7686947 Mon Sep 17 00:00:00 2001 From: KeisukeYamashita <19yamashita15@gmail.com> Date: Fri, 26 Jul 2024 22:02:14 +0200 Subject: [PATCH] chore: mount instead of copy Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> --- .gitignore | 23 ++++++++++++++++++++++- Dockerfile | 4 ++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d8fa3e3..2b2a8c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,23 @@ -/target +### Generated by gibo (https://github.com/simonwhitaker/gibo) +### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Rust.gitignore + +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +# Commitlint binary +commitlint + +# Commitlint config file .commitlintrc.* diff --git a/Dockerfile b/Dockerfile index 76965b0..d88bd76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ WORKDIR /app RUN apk update \ && apk add --no-cache musl-dev -COPY . . -RUN cargo install --path . + +RUN --mount=type=bind,target=. cargo install --path . FROM alpine LABEL maintainer="KeisukeYamashita <19yamashita15@gmail.com>"