Skip to content

Commit

Permalink
Fix dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jul 27, 2024
1 parent 3ae731a commit 219797e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions cmd/dummybridge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM golang:1-alpine3.20 AS builder

RUN apk add --no-cache build-base olm-dev

COPY . /build
WORKDIR /build
ENV CGO_ENABLED=0
RUN go build ./cmd/dummybridge -o /usr/bin/dummybridge
ENV CGO_ENABLED=1
RUN go build -o /usr/bin/dummybridge ./cmd/dummybridge

FROM alpine:3.20

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache ca-certificates olm
COPY --from=builder /usr/bin/dummybridge /usr/bin/dummybridge
CMD ["/usr/bin/dummybridge"]
8 changes: 5 additions & 3 deletions cmd/loginhelper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM golang:1-alpine3.20 AS builder

RUN apk add --no-cache build-base olm-dev

COPY . /build
WORKDIR /build
ENV CGO_ENABLED=0
RUN go build ./cmd/loginhelper -o /usr/bin/loginhelper
ENV CGO_ENABLED=1
RUN go build -o /usr/bin/loginhelper ./cmd/loginhelper

FROM alpine:3.20

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache ca-certificates olm
COPY --from=builder /usr/bin/loginhelper /usr/bin/loginhelper
CMD ["/usr/bin/loginhelper"]

0 comments on commit 219797e

Please sign in to comment.