diff --git a/.dockerignore b/.dockerignore index bd8f0b041..bd1816b8b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,7 +6,6 @@ frontend/dist tools/syn2mas/** docs/ .devcontainer/ -.git/ .github/ .gitignore Dockerfile diff --git a/Dockerfile b/Dockerfile index 7824f9fad..618a8d732 100644 --- a/Dockerfile +++ b/Dockerfile @@ -140,8 +140,7 @@ RUN --network=default \ --package mas-cli # Build the rest -COPY ./Cargo.toml ./Cargo.lock /app/ -COPY ./crates /app/crates +COPY ./ /app ENV SQLX_OFFLINE=true # Network access: cargo auditable needs it RUN --network=default \ diff --git a/docker-bake.hcl b/docker-bake.hcl index fd6741db1..1c3e94d9c 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -9,6 +9,12 @@ target "docker-metadata-action-syn2mas" {} // This sets the platforms and is further extended by GitHub Actions to set the // output and the cache locations target "base" { + args = { + // This is set so that when we use a git context, the .git directory is + // present, as we infer the version at build time out of it + BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1 + } + platforms = [ "linux/amd64", "linux/arm64",