Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve: install golang by image in the Dockerfile #1246

Merged
merged 1 commit into from
Jul 12, 2024
Merged
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
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
# Explicit version of Pulsar and Golang images should be
# set via the Makefile or CLI
ARG PULSAR_IMAGE=apachepulsar/pulsar:latest

ARG GO_VERSION=1.20
FROM golang:$GO_VERSION as golang

FROM $PULSAR_IMAGE
USER root
ARG GO_VERSION=1.18
ARG ARCH=amd64

RUN curl -L https://dl.google.com/go/go${GO_VERSION}.linux-${ARCH}.tar.gz -o golang.tar.gz && \
mkdir -p /pulsar/go && tar -C /pulsar -xzf golang.tar.gz
COPY --from=golang /usr/local/go /pulsar/go

ENV PATH /pulsar/go/bin:$PATH

RUN apt-get update && apt-get install -y git && apt-get install -y gcc

RUN apt-get update && apt-get install -y git gcc

### Add pulsar config
COPY integration-tests/certs /pulsar/certs
Expand Down
Loading