aboutsummaryrefslogtreecommitdiffhomepage
path: root/Dockerfile.tools
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-21 18:12:49 +0900
committernsfisis <nsfisis@gmail.com>2024-07-21 18:12:49 +0900
commit2512da7ca57dc4c52900417a50daf4f6f2f74054 (patch)
tree6a4921a9fcd2fe774171795425ba04889c9c8a49 /Dockerfile.tools
parente3373eb48b8cd5eef61a59d8ff590db184612294 (diff)
downloadiosdc-japan-2024-albatross-2512da7ca57dc4c52900417a50daf4f6f2f74054.tar.gz
iosdc-japan-2024-albatross-2512da7ca57dc4c52900417a50daf4f6f2f74054.tar.zst
iosdc-japan-2024-albatross-2512da7ca57dc4c52900417a50daf4f6f2f74054.zip
add sqldef and sqlc
Diffstat (limited to 'Dockerfile.tools')
-rw-r--r--Dockerfile.tools13
1 files changed, 13 insertions, 0 deletions
diff --git a/Dockerfile.tools b/Dockerfile.tools
new file mode 100644
index 0000000..de025b8
--- /dev/null
+++ b/Dockerfile.tools
@@ -0,0 +1,13 @@
+FROM golang:1.22.3
+
+WORKDIR /tools
+
+RUN wget -O psqldef.tar.gz https://github.com/sqldef/sqldef/releases/download/v0.17.14/psqldef_linux_amd64.tar.gz
+
+RUN tar -xzf psqldef.tar.gz && \
+ rm -f psqldef.tar.gz
+
+RUN touch /usr/local/bin/psqldef && \
+ echo '#!/bin/sh' >> /usr/local/bin/psqldef && \
+ echo '/tools/psqldef --user="$POSTGRES_USER" --password="$POSTGRES_PASSWORD" --host=db "$POSTGRES_DB" "$@"' >> /usr/local/bin/psqldef && \
+ chmod +x /usr/local/bin/psqldef