VERISON in Dockerfile abhandeln
This commit is contained in:
1 parent
58f5522442
commit
89f02422e7
3 files changed
+55
-143
No files matched your search
+4
-1
@@ -6,11 +6,14 @@ WORKDIR /usr/src/app
|
||||
|
||||
COPY Cargo.toml ./
|
||||
COPY Cargo.lock ./
|
||||
COPY VERSION ./
|
||||
COPY src ./src
|
||||
COPY templates ./templates
|
||||
COPY static ./static
|
||||
|
||||
RUN cargo build --release
|
||||
RUN VERSION=$(cat VERSION) \
|
||||
&& sed -i 's/^version = "__VERSION__"/version = "'"$VERSION"'"/' Cargo.toml \
|
||||
&& cargo build --release
|
||||
|
||||
# Runtime Stage
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
Reference in new issue
Block a user