Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
FROM golang:1.11.6-stretch as golang
ARG BUILDPLATFORM=linux/amd64

FROM --platform=$BUILDPLATFORM golang:1.11.6-stretch as golang
WORKDIR /go/src/github.com/buoyantio/bb
ADD . /go/src/github.com/buoyantio/bb

RUN mkdir -p /out
RUN ./bin/dep ensure
RUN go build -o /out/bb .
ARG TARGETARCH
RUN GOOS=linux GOARCH=$TARGETARCH go build -o /out/bb .

FROM debian:buster-20200514-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
dnsutils \
iptables \
jq \
nghttp2 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# We still rely on old iptables-legacy syntax.
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy \
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

FROM gcr.io/linkerd-io/base:2019-02-19.01
RUN apt-get update
RUN apt-get install -y ca-certificates
COPY --from=golang /out /out
ENTRYPOINT ["/out/bb"]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,18 @@ You can then use `curl`to query the service:

$ curl `minikube -n bb-readme service bb-readme-gateway-svc --url`
{"requestUid":"in:http-sid:point-to-point-channel-grpc:-1-h1:8080-66349706","payload":"BANANA"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a note and commands here to create the multiarch builder image? Something like what we have here: https://github.com/linkerd/linkerd2-proxy-init/blob/master/Makefile#L73

## Build Multi-Arch Images with Buildx

Create the builder instance:

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name=multiarch-builder --driver=docker-container --use
docker buildx inspect multiarch-builder --bootstrap

Build the images:

docker buildx build . \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--push \
--tag buoyantio/bb:<version>