From 76a35081410d0a52bffdfb0d6263776755923bb9 Mon Sep 17 00:00:00 2001 From: Tilman Vogel Date: Sat, 27 Sep 2025 12:43:53 +0200 Subject: [PATCH 1/3] chore: add docker-build This adds a Dockerfile and Makefile rule to build the code in Docker (on non-Ubuntu hosts). The built binary will be placed in dist/tigrisfs. This also removes `.git` from `.dockerignore` because `git describe` is needed in the build process inside the container to determine the version label. --- .dockerignore | 1 - Dockerfile | 15 +++++++++++++++ Makefile | 4 ++++ go.mod | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore index 4347d4e6..b5ffa835 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1 @@ goofys -.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..fbff9d86 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:latest AS build + +RUN apt-get update && apt-get install -y git make wget curl sudo unzip golang shellcheck s3cmd util-linux fuse3 + +COPY --link . /src + +WORKDIR /src + +ENV CGO_ENABLED=0 + +RUN make setup +RUN make build + +FROM scratch +COPY --from=build /src/tigrisfs / diff --git a/Makefile b/Makefile index 600c5b33..0c4682d1 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,10 @@ get-deps: s3proxy.jar build: go build $(BUILD_PARAM) +.PHONY: docker-build +docker-build: + docker build --output dist . + build-debug: CGO_ENABLED=1 go build -race $(BUILD_PARAM) diff --git a/go.mod b/go.mod index a353b50a..c08fa8ec 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/tigrisdata/tigrisfs -go 1.24 +go 1.24.0 require ( cloud.google.com/go/storage v1.51.0 From ce42618a56f26733edc15e435aabff9930fa896f Mon Sep 17 00:00:00 2001 From: Tilman Vogel Date: Tue, 30 Sep 2025 16:06:40 +0200 Subject: [PATCH 2/3] chore: add docker-build CI workflow --- .github/workflows/docker-build.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-build.yaml diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 00000000..4fa80eb2 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,18 @@ +name: docker-build + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@main + - name: build application + run: make docker-build + - name: check dist + run: ls -l dist/ && file dist/tigrisfs + From b83f993ae586c5309348a486d40f63bda482d67d Mon Sep 17 00:00:00 2001 From: Tilman Vogel Date: Tue, 4 Nov 2025 14:18:27 +0100 Subject: [PATCH 3/3] Update .github/workflows/docker-build.yaml pin checkout action to v5 Co-authored-by: Scott Brenner --- .github/workflows/docker-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 4fa80eb2..6c8d4f22 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout repo - uses: actions/checkout@main + uses: actions/checkout@v5 - name: build application run: make docker-build - name: check dist