Skip to content

Commit

Permalink
reverted dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Jasmin Gacic <jasmin.gacic@gmail.com>
  • Loading branch information
jasmingacic committed Apr 4, 2022
1 parent 5946f13 commit d77d3e3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion kgw-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ spec:
app: kgwtest
spec:
containers:
- image: jasmingacic/kuskgateway-api
- image: jasmingacic/kuskgateway-api:latest
imagePullPolicy: Always
name: kuskgateway-api
serviceAccountName: kusk-gateway-manager
---
Expand Down
22 changes: 13 additions & 9 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
FROM golang:1.10 AS build
FROM golang:1.17 AS build
WORKDIR /go/src
COPY go ./go
COPY main.go .
# Copy `go.mod` for definitions and `go.sum` to invalidate the next layer
# in case of a change in the dependencies
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download

ENV CGO_ENABLED=0
RUN go get -d -v ./...

RUN go build -a -installsuffix cgo -o openapi .
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -v -o kusk-gateway-api

FROM scratch AS runtime
COPY --from=build /go/src/openapi ./
COPY --from=build --chown=65532:65532 /go/src/kusk-gateway-api ./
EXPOSE 8080/tcp
ENTRYPOINT ["./openapi"]

USER 65532:65532

ENTRYPOINT ["./kusk-gateway-api"]

0 comments on commit d77d3e3

Please sign in to comment.