Skip to content

Commit 59484a4

Browse files
committed
Add version to Docker container
1 parent 16d82e5 commit 59484a4

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.dockerignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ ignore
44
Dockerfile
55
tags
66
data
7-
node_modules
7+
web/node_modules
88
sage

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ WORKDIR /src
1313
COPY go.mod go.sum ./
1414
RUN go mod download
1515
COPY . .
16+
ARG VERSION
1617
RUN make build
1718

1819
FROM scratch

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ build: static
4343

4444
.PHONY: docker
4545
docker:
46-
docker build -t johnstarich/sage:${VERSION} .
46+
docker build \
47+
--build-arg VERSION=${VERSION} \
48+
-t johnstarich/sage:${VERSION} \
49+
.
4750

4851
.PHONY: clean
4952
clean: out

0 commit comments

Comments
 (0)