From 64223c57968ca9bd722cd7ecb28f11c7e6133dbc Mon Sep 17 00:00:00 2001 From: jghezzi Date: Fri, 22 Dec 2023 12:25:44 +1100 Subject: [PATCH 1/5] fix --- containers/golang/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/containers/golang/Dockerfile b/containers/golang/Dockerfile index 56560d5..1402920 100644 --- a/containers/golang/Dockerfile +++ b/containers/golang/Dockerfile @@ -2,6 +2,9 @@ FROM golang:1.21-alpine RUN apk update && apk add bash build-base +# Temporary fix for https://github.com/mattn/go-sqlite3/pull/1177. We can remove this once rubenv-sql-migrate is updated to use the patched version of go-sqllite3. +ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE" + ARG tool_type=rubenv-sql-migrate RUN if [ "$tool_type" = "rubenv-sql-migrate" ]; then \ go install github.com/rubenv/sql-migrate/...@latest; \ From 48d957869219162dfc4d287386bc84876b6794e4 Mon Sep 17 00:00:00 2001 From: jghezzi Date: Fri, 22 Dec 2023 12:37:22 +1100 Subject: [PATCH 2/5] update to conditional --- containers/golang/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/golang/Dockerfile b/containers/golang/Dockerfile index 1402920..5895e62 100644 --- a/containers/golang/Dockerfile +++ b/containers/golang/Dockerfile @@ -2,12 +2,12 @@ FROM golang:1.21-alpine RUN apk update && apk add bash build-base -# Temporary fix for https://github.com/mattn/go-sqlite3/pull/1177. We can remove this once rubenv-sql-migrate is updated to use the patched version of go-sqllite3. -ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE" + ARG tool_type=rubenv-sql-migrate RUN if [ "$tool_type" = "rubenv-sql-migrate" ]; then \ - go install github.com/rubenv/sql-migrate/...@latest; \ + # CGO_CFLAGS is a temporary fix for https://github.com/mattn/go-sqlite3/pull/1177. We can remove this once rubenv-sql-migrate is updated to use the patched version of go-sqllite3. + CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go install github.com/rubenv/sql-migrate/...@latest; \ fi WORKDIR / From faecdd18249d13484c4bc7229982f024d1875dd2 Mon Sep 17 00:00:00 2001 From: jghezzi Date: Fri, 22 Dec 2023 12:38:09 +1100 Subject: [PATCH 3/5] redundant change --- containers/golang/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/containers/golang/Dockerfile b/containers/golang/Dockerfile index 5895e62..76df396 100644 --- a/containers/golang/Dockerfile +++ b/containers/golang/Dockerfile @@ -2,8 +2,6 @@ FROM golang:1.21-alpine RUN apk update && apk add bash build-base - - ARG tool_type=rubenv-sql-migrate RUN if [ "$tool_type" = "rubenv-sql-migrate" ]; then \ # CGO_CFLAGS is a temporary fix for https://github.com/mattn/go-sqlite3/pull/1177. We can remove this once rubenv-sql-migrate is updated to use the patched version of go-sqllite3. From 6afb1a601f742225d3a4f75f8ff13b4b475dc8a9 Mon Sep 17 00:00:00 2001 From: jghezzi Date: Fri, 22 Dec 2023 12:45:33 +1100 Subject: [PATCH 4/5] redact comment --- containers/golang/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/golang/Dockerfile b/containers/golang/Dockerfile index 76df396..d4ae2bd 100644 --- a/containers/golang/Dockerfile +++ b/containers/golang/Dockerfile @@ -4,7 +4,7 @@ RUN apk update && apk add bash build-base ARG tool_type=rubenv-sql-migrate RUN if [ "$tool_type" = "rubenv-sql-migrate" ]; then \ - # CGO_CFLAGS is a temporary fix for https://github.com/mattn/go-sqlite3/pull/1177. We can remove this once rubenv-sql-migrate is updated to use the patched version of go-sqllite3. + # CGO_CFLAGS is a temporary fix for https://github.com/mattn/go-sqlite3/pull/1177. CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go install github.com/rubenv/sql-migrate/...@latest; \ fi From 9eaa83cbf62e8ffeafb2c60e129c4ef24bfa74b6 Mon Sep 17 00:00:00 2001 From: jghezzi Date: Fri, 22 Dec 2023 12:47:20 +1100 Subject: [PATCH 5/5] remove comment --- containers/golang/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/containers/golang/Dockerfile b/containers/golang/Dockerfile index d4ae2bd..c0b783f 100644 --- a/containers/golang/Dockerfile +++ b/containers/golang/Dockerfile @@ -4,7 +4,6 @@ RUN apk update && apk add bash build-base ARG tool_type=rubenv-sql-migrate RUN if [ "$tool_type" = "rubenv-sql-migrate" ]; then \ - # CGO_CFLAGS is a temporary fix for https://github.com/mattn/go-sqlite3/pull/1177. CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go install github.com/rubenv/sql-migrate/...@latest; \ fi