From a55b97e92f8257ec688e518032a98900eebaac63 Mon Sep 17 00:00:00 2001 From: Michael Ira Krufky Date: Sun, 3 Feb 2019 08:03:34 -0500 Subject: [PATCH] Dockerfile: conditionally change coin name in gettext via env --- docker/Dockerfile | 3 +++ docker/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 5962566355..a29c69baf4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,6 +19,9 @@ RUN mix do deps.get, deps.compile ADD . . +ARG COIN +RUN if [ "$COIN" != "" ]; then sed -i s/"POA"/"${COIN}"/g apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po; fi + # Run forderground build and phoenix digest RUN mix compile diff --git a/docker/Makefile b/docker/Makefile index e280a753e5..1f49ff50b5 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -53,7 +53,7 @@ ifdef HAS_BLOCKSCOUT_IMAGE @echo "==> Image exist. Using $(DOCKER_IMAGE)" else @echo "==> No image found trying to build one..." - @docker build -f ./Dockerfile -t $(DOCKER_IMAGE) ../ + @docker build --build-arg COIN="$(COIN)" -f ./Dockerfile -t $(DOCKER_IMAGE) ../ endif migrate: build postgres