Skip to content

Commit

Permalink
update: go 1.18,kafka-go 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nefro85 committed Nov 8, 2023
1 parent 1b26c35 commit 3bbc4e0
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 223 deletions.
23 changes: 14 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
FROM golang:1.17.11-bullseye

RUN set -ex; \
mkdir /opt/kafka-gateway; \
go get -u gopkg.in/confluentinc/confluent-kafka-go.v1/kafka;

ARG VCS=unknown
ARG BUILD_DATE=unknown
FROM golang:1.18.10-bullseye as builder

ENV DEV=/opt/kafka-gateway
RUN mkdir -p $DEV
Expand All @@ -15,9 +8,21 @@ ADD . $DEV

RUN set -ex; \
ls -ls; \
go version; \
go version; \
go get -u github.com/confluentinc/confluent-kafka-go/v2/kafka; \
go build -o ./bin/gateway;

FROM debian:latest
ENV DEV=/opt/kafka-gateway
RUN mkdir -p $DEV

WORKDIR $DEV
COPY entrypoint.sh entrypoint.sh
COPY --from=builder /opt/kafka-gateway/bin/gateway /opt/kafka-gateway/bin/gateway

ARG VCS=unknown
ARG BUILD_DATE=unknown

ENV PATH=$PATH:$DEV/bin

ENV BUILD_GIT_REF=${VCS}
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ Enviroment variables:
### Tips

Setup the env `CGO_ENABLED=0` in order to build app with kafka lib.

Update notes:
```bash
# 2023-11-08

go get -u github.com/confluentinc/confluent-kafka-go/v2/kafka
go mod tidy

```
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module s7i.io/kafka-gateway

go 1.17
go 1.18

require github.com/confluentinc/confluent-kafka-go v1.9.1
require github.com/confluentinc/confluent-kafka-go/v2 v2.3.0
Loading

0 comments on commit 3bbc4e0

Please sign in to comment.