Skip to content

Commit

Permalink
Implements projectcontour#2789
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Leow <leow@sinarproject.org>
  • Loading branch information
leowmjw committed Oct 14, 2020
1 parent 47c4eb2 commit a095679
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM golang:1.15.2 AS build
WORKDIR /contour

ENV GOPROXY=https://proxy.golang.org
COPY go.mod go.sum /contour/
RUN go mod download

COPY cmd cmd
COPY internal internal
COPY apis apis
COPY Makefile Makefile

ARG BUILD_BRANCH
ARG BUILD_SHA
ARG BUILD_VERSION

RUN make install \
CGO_ENABLED=0 \
GOOS=linux \
BUILD_VERSION=${BUILD_VERSION} \
BUILD_SHA=${BUILD_SHA} \
BUILD_BRANCH=${BUILD_BRANCH}

FROM debian:stable-slim
RUN apt-get update && \
apt-get install --no-install-recommends -y \
curl \
iproute2 \
iputils-ping \
dnsutils \
netcat \
tcpdump \
tcptraceroute traceroute \
net-tools \
libc6-dbg gdb \
elvis-tiny \
lsof \
procps \
busybox && \
alias vim=elvis-tiny && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /go/bin/contour /bin/contour
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ container: ## Build the Contour container image
$(shell pwd) \
--tag $(IMAGE):$(VERSION)

debug-container: ## Build the Contour debug container image
docker build \
-f Dockerfile.debug \
--build-arg "BUILD_VERSION=$(BUILD_VERSION)" \
--build-arg "BUILD_BRANCH=$(BUILD_BRANCH)" \
--build-arg "BUILD_SHA=$(BUILD_SHA)" \
$(DOCKER_BUILD_LABELS) \
$(shell pwd) \
--tag $(IMAGE)-debug:$(VERSION)

push: ## Push the Contour container image to the Docker registry
push: container
docker push $(IMAGE):$(VERSION)
Expand Down

0 comments on commit a095679

Please sign in to comment.