Skip to content

Commit 432cd4e

Browse files
committed
Updated docker image
1 parent eadfe0d commit 432cd4e

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

Diff for: .dockerignore

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
# Other
2-
Assignment.md
3-
README.md
1+
# Git & GitHub
2+
.git
43
.gitignore
4+
.github
55

66
# Genereated protobuf files
7-
pb
7+
proto/*.pb.go
88

99
# Docker
1010
.dockerignore
1111
Dockerfile
12-
docker-compose.yml
12+
docker-compose.yml
13+
14+
# Other
15+
Assignment.md
16+
README.md
17+
REPORT.md
18+
Lamport.png
19+
LICENSE
20+
example.log

Diff for: Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ RUN apk update && apk upgrade --no-cache && \
1616
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
1717
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
1818

19-
ADD Makefile ./
20-
ADD proto ./proto
19+
COPY proto proto
2120

22-
RUN make proto
21+
RUN --mount=type=bind,source=Makefile,target=Makefile \
22+
make proto
2323

2424

25-
FROM chef AS builder
25+
FROM chef AS grpc-builder
2626

2727
WORKDIR /build
2828

29-
COPY --from=proto-builder /build/proto ./
29+
COPY --from=proto-builder /build/proto proto
3030

3131
ADD . .
3232

@@ -37,7 +37,7 @@ FROM alpine:3.20 AS runner
3737

3838
WORKDIR /var/app
3939

40-
COPY --from=builder /build/bin/grpc .
40+
COPY --from=grpc-builder /build/bin/grpc .
4141

4242
RUN addgroup -S app && \
4343
adduser -S chitty -G app && \

0 commit comments

Comments
 (0)