Skip to content

Commit 0b535eb

Browse files
committed
Make sure the Docker image has the git version in it
1 parent 1392bf2 commit 0b535eb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ frontend/dist
66
tools/syn2mas/**
77
docs/
88
.devcontainer/
9-
.git/
109
.github/
1110
.gitignore
1211
Dockerfile

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ RUN --network=default \
140140
--package mas-cli
141141

142142
# Build the rest
143-
COPY ./Cargo.toml ./Cargo.lock /app/
144-
COPY ./crates /app/crates
143+
COPY ./ /app
145144
ENV SQLX_OFFLINE=true
146145
# Network access: cargo auditable needs it
147146
RUN --network=default \

docker-bake.hcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ target "docker-metadata-action-syn2mas" {}
99
// This sets the platforms and is further extended by GitHub Actions to set the
1010
// output and the cache locations
1111
target "base" {
12+
args = {
13+
// This is set so that when we use a git context, the .git directory is
14+
// present, as we infer the version at build time out of it
15+
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
16+
}
17+
1218
platforms = [
1319
"linux/amd64",
1420
"linux/arm64",

0 commit comments

Comments
 (0)