Skip to content

Commit de04103

Browse files
committed
feat: build docker image
1 parent 9bfeae5 commit de04103

File tree

20 files changed

+70
-1270
lines changed

20 files changed

+70
-1270
lines changed

.github/workflows/docker.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and publish Docker image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
release:
9+
types: [published]
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build-and-publish-image:
17+
runs-on: warp-ubuntu-latest-arm64-2x
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Log in to the ghcr.io registry
21+
uses: docker/login-action@v2
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.repository_owner }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Docker meta
28+
id: meta
29+
uses: docker/metadata-action@v3
30+
with:
31+
images: |
32+
ghcr.io/fuellabs/segment-proxy
33+
tags: |
34+
type=ref,event=branch
35+
type=sha,prefix=
36+
type=semver,pattern={{raw}}
37+
type=raw,value=latest
38+
39+
- name: Set up Docker Buildx
40+
uses: docker/setup-buildx-action@v1
41+
42+
- name: Build and push the image to ghcr.io
43+
uses: docker/build-push-action@v6
44+
id: publish
45+
with:
46+
context: ${{ github.workspace }}
47+
file: Dockerfile
48+
push: true
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}
51+
platforms: linux/amd64,linux/arm64

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/bin
2+
.DS_Store

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
FROM golang:1.14.4-alpine3.11 as builder
1+
FROM golang:1.25.3-alpine3.22 AS builder
22

33
RUN apk add --update ca-certificates git
44

5-
ENV SRC github.com/segmentio/segment-proxy
5+
ENV SRC github.com/FuelLabs/segment-proxy
66
ENV CGO_ENABLED=0
77
ENV GO111MODULE=on
88
ENV GOOS=linux
9-
ENV GOARCH=amd64
109

1110
ARG VERSION
1211

@@ -22,4 +21,4 @@ COPY --from=builder /proxy /proxy
2221

2322
EXPOSE 8080
2423

25-
ENTRYPOINT ["/proxy"]
24+
ENTRYPOINT ["/proxy"]

Godeps/Godeps.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

Godeps/Readme

Lines changed: 0 additions & 5 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ build:
22
gox -output="bin/{{.Dir}}_{{.OS}}_{{.Arch}}"
33

44
server:
5-
go run main.go
5+
go run main.go --debug true
66

77
test:
88
go test -v -cover ./...
99

1010
docker:
11-
docker build -t segment/proxy .
11+
docker build -t fuellabs/proxy .
1212

1313
docker-push:
14-
docker push segment/proxy
14+
docker push fuellabs/proxy
1515

1616
.PHONY: build server test docker docker-push

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ Usage of proxy:
1616

1717
### Via Source
1818

19-
1. Clone the repo `git clone [email protected]:segmentio/segment-proxy.git`.
19+
1. Clone the repo `git clone [email protected]:FuelLabs/segment-proxy.git`.
2020
2. Run `make build server`.
2121

2222
### Via Golang
2323

24-
1. Run `go get github.com/segmentio/segment-proxy`.
24+
1. Run `go get github.com/FuelLabs/segment-proxy`.
2525
2. Run `segment-proxy`.
2626

2727
### Via prebuilt binaries.
2828

29-
Download the latest binaries from [Github](https://github.com/segmentio/segment-proxy/releases).
29+
Download the latest binaries from [Github](https://github.com/FuelLabs/segment-proxy/releases).
3030

3131
### Via Docker
3232

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
4. Run `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version).
77
5. Run `git push && git push --tags`.
88
6. Run `make docker-push`.
9-
7. Create a release on [Github](https://github.com/segmentio/segment-proxy/releases).
9+
7. Create a release on [Github](https://github.com/FuelLabs/segment-proxy/releases).
1010
8. Upload the files from the `bin` folder.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
module github.com/segmentio/segment-proxy
1+
module github.com/FuelLabs/segment-proxy
22

33
go 1.13
44

5-
require github.com/gorilla/handlers v0.0.0-20160228171604-ee54c7b44cab
5+
require github.com/gorilla/handlers v1.5.2

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
2+
github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
3+
github.com/gorilla/handlers v0.0.0-20160228171604-ee54c7b44cab h1:WswuRtLyNm6ABXEQ1LSd7gsW15zA8RQsQzZbMYDm6Ug=
4+
github.com/gorilla/handlers v0.0.0-20160228171604-ee54c7b44cab/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
5+
github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=
6+
github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=

0 commit comments

Comments
 (0)