Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
switch and pin images for Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sedkis committed Jul 2, 2020
1 parent edd2be8 commit fee19a6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docker/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start from the latest golang base image
FROM golang:latest as builder
FROM golang:1.13 as builder

# Set the Current Working Directory inside the container
WORKDIR /app
Expand All @@ -18,15 +18,14 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o tyk-k8s .


######## Start a new stage from scratch #######
FROM alpine:latest

RUN apk --no-cache add ca-certificates
FROM debian:buster-slim

RUN mkdir -p /opt/tyk-k8s
WORKDIR /opt/tyk-k8s

# Copy the Pre-built binary file from the previous stage
COPY --from=builder /app/tyk-k8s /opt/tyk-k8s/tyk-k8s

# Command to run the executable
CMD ["./tyk-k8s", "start"]
ENTRYPOINT ["./tyk-k8s"]

CMD ["start"]

0 comments on commit fee19a6

Please sign in to comment.