Skip to content

Commit 8ad8141

Browse files
download correct build of dbmate based on architecture (#527)
1 parent f274db1 commit 8ad8141

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,16 @@ RUN apt-get update && \
7777
&& echo "listen_addresses='*'" >> /etc/postgresql/15/main/postgresql.conf \
7878
&& sed -i "s/^port = .*/port = ${DB_PORT}/" /etc/postgresql/15/main/postgresql.conf \
7979
&& npm install --global yarn --force \
80-
&& curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/releases/download/v1.16.0/dbmate-linux-amd64 \
80+
&& if [ "$(uname -m)" = "x86_64" ]; then \
81+
curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/releases/download/v1.16.0/dbmate-linux-amd64; \
82+
elif [ "$(uname -m)" = "aarch64" ]; then \
83+
curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/releases/download/v1.16.0/dbmate-linux-arm64; \
84+
elif [ "$(uname -m)" = "arm64" ]; then \
85+
curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/releases/download/v1.16.0/dbmate-linux-arm64; \
86+
else \
87+
echo "Unsupported architecture: $(uname -m)"; \
88+
exit 1; \
89+
fi \
8190
&& chmod +x /usr/local/bin/dbmate \
8291
&& mkdir -p /var/log/postgres \
8392
&& touch /var/log/postgres/postgres.log \

0 commit comments

Comments
 (0)