Skip to content

Commit

Permalink
Image pinning (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
trstringer authored Feb 26, 2024
1 parent b6813f2 commit e7e4c29
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.cart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ COPY . /var/app
WORKDIR /var/app
RUN CGO_ENABLED=0 go build -o cart ./cmd/cart

FROM alpine:3
FROM alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911
COPY --from=builder /var/app/cart /var/app/cart
ENTRYPOINT ["/var/app/cart"]
6 changes: 3 additions & 3 deletions dockerfiles/Dockerfile.collector
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM alpine:3.13 as certs
FROM alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911 AS certs
RUN apk --update add ca-certificates

FROM alpine:3.13 AS collector-build
FROM alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911 AS collector-build
COPY ./collector/dist/otel-shopping-cart-collector /otel-shopping-cart-collector
RUN chmod 755 /otel-shopping-cart-collector

FROM ubuntu:latest
FROM ubuntu:22.04@sha256:f9d633ff6640178c2d0525017174a688e2c1aef28f0a0130b26bd5554491f0da
LABEL org.opencontainers.image.source https://github.com/trstringer/manual-approval

ARG USER_UID=10001
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.dataseed
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:latest
FROM ubuntu:22.04@sha256:f9d633ff6640178c2d0525017174a688e2c1aef28f0a0130b26bd5554491f0da
LABEL org.opencontainers.image.source https://github.com/trstringer/manual-approval
WORKDIR /var/app
COPY ./database/setup.sql /var/app
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.interrupter
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COPY . /var/app
WORKDIR /var/app
RUN CGO_ENABLED=0 go build -o interrupter ./cmd/interrupter

FROM alpine:3
FROM alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911
LABEL org.opencontainers.image.source https://github.com/trstringer/manual-approval
COPY --from=builder /var/app/interrupter /var/app/interrupter
ENTRYPOINT ["/var/app/interrupter"]
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.price
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:latest
FROM ubuntu:22.04@sha256:f9d633ff6640178c2d0525017174a688e2c1aef28f0a0130b26bd5554491f0da
LABEL org.opencontainers.image.source https://github.com/trstringer/manual-approval
COPY \
./external/price_server \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.trafficgen
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COPY . /var/app
WORKDIR /var/app
RUN CGO_ENABLED=0 go build -o trafficgen ./cmd/trafficgen

FROM alpine:3
FROM alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911
LABEL org.opencontainers.image.source https://github.com/trstringer/manual-approval
COPY --from=builder /var/app/trafficgen /var/app/trafficgen
ENTRYPOINT ["/var/app/trafficgen"]
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.users
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ COPY . /var/app
WORKDIR /var/app
RUN CGO_ENABLED=0 go build -o users ./cmd/users

FROM alpine:3
FROM alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911
COPY --from=builder /var/app/users /var/app/users
ENTRYPOINT ["/var/app/users"]

0 comments on commit e7e4c29

Please sign in to comment.