From ed154af8fad3cc27ab9cb129e5c36c8c01d0cb31 Mon Sep 17 00:00:00 2001 From: hfuss Date: Mon, 14 Feb 2022 16:26:55 -0500 Subject: [PATCH 1/2] go-migrate in Dockerfile Signed-off-by: hfuss --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f0a12d36f..652a5bb0d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,5 +46,8 @@ COPY --from=firefly-builder /firefly/db ./db COPY --from=solidity-builder /firefly/solidity_firefly/build/contracts ./contracts COPY --from=fabric-builder /firefly/smart_contracts/fabric/firefly-go/firefly_fabric.tar.gz ./contracts/firefly_fabric.tar.gz RUN ln -s /firefly/firefly /usr/bin/firefly \ - && apk add --update --no-cache postgresql-client curl jq + && apk add --update --no-cache postgresql-client curl jq \ + && curl -sL "https://github.com/golang-migrate/migrate/releases/download/$(curl -sL https://api.github.com/repos/golang-migrate/migrate/releases/latest | jq -r '.name')/migrate.linux-amd64.tar.gz" | tar xz \ + && chmod +x ./migrate \ + && cp ./migrate /usr/bin/migrate ENTRYPOINT [ "firefly" ] From 425f97fe6528ee29b44f7977c4fe7362c66af9f0 Mon Sep 17 00:00:00 2001 From: hfuss Date: Mon, 14 Feb 2022 16:41:23 -0500 Subject: [PATCH 2/2] mv not cp Signed-off-by: hfuss --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 652a5bb0d8..af2273b7ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,5 +49,5 @@ RUN ln -s /firefly/firefly /usr/bin/firefly \ && apk add --update --no-cache postgresql-client curl jq \ && curl -sL "https://github.com/golang-migrate/migrate/releases/download/$(curl -sL https://api.github.com/repos/golang-migrate/migrate/releases/latest | jq -r '.name')/migrate.linux-amd64.tar.gz" | tar xz \ && chmod +x ./migrate \ - && cp ./migrate /usr/bin/migrate + && mv ./migrate /usr/bin/migrate ENTRYPOINT [ "firefly" ]