Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(dockerfile): use ENV cmd set PATH env (#8822)

zll6001d87d92f39f0
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index de5e982d4c..1ac1adace4 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -92,7 +92,7 @@ RUN apt-get update && apt-get install -y locales curl psmisc procps libncurses5
# Generate en_US.UTF-8 locale which is needed to start postgres server.
# Fix the posgres server issue (invalid value for parameter "lc_messages": "en_US.UTF-8").
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
-RUN echo "export PATH=$PATH:/var/opt/bytebase/resources/postgres-linux-amd64-16/bin:/var/opt/bytebase/resources/postgres-linux-arm64-16/bin" >> /root/.bashrc
+ENV PATH="${PATH}:/var/opt/bytebase/resources/postgres-linux-amd64-16/bin:/var/opt/bytebase/resources/postgres-linux-arm64-16/bin"
# Copy utility scripts, we have
# - Demo script to launch Bytebase in readonly demo mode
diff --git a/scripts/Dockerfile.depot b/scripts/Dockerfile.depot
index 15ffb531f6..e8912ef370 100644
--- a/scripts/Dockerfile.depot
+++ b/scripts/Dockerfile.depot
@@ -66,7 +66,7 @@ RUN apt-get update && apt-get install -y locales curl psmisc procps libncurses5
# Generate en_US.UTF-8 locale which is needed to start postgres server.
# Fix the posgres server issue (invalid value for parameter "lc_messages": "en_US.UTF-8").
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
-RUN echo "export PATH=$PATH:/var/opt/bytebase/resources/postgres-linux-amd64-16/bin:/var/opt/bytebase/resources/postgres-linux-arm64-16/bin" >> /root/.bashrc
+ENV PATH="${PATH}:/var/opt/bytebase/resources/postgres-linux-amd64-16/bin:/var/opt/bytebase/resources/postgres-linux-arm64-16/bin"
# Copy utility scripts, we have
# - Demo script to launch Bytebase in readonly demo mode
@@ -81,4 +81,4 @@ CMD ["--port", "80", "--data", "/var/opt/bytebase"]
HEALTHCHECK --interval=5m --timeout=60s CMD curl -f http://localhost:80/healthz || exit 1
-ENTRYPOINT ["bytebase"]
\ No newline at end of file
+ENTRYPOINT ["bytebase"]
diff --git a/scripts/Dockerfile.render-demo b/scripts/Dockerfile.render-demo
index ac7530a989..e2317d3f6d 100644
--- a/scripts/Dockerfile.render-demo
+++ b/scripts/Dockerfile.render-demo
@@ -79,7 +79,7 @@ RUN apt-get update && apt-get install -y locales curl psmisc procps libncurses5
# Generate en_US.UTF-8 locale which is needed to start postgres server.
# Fix the posgres server issue (invalid value for parameter "lc_messages": "en_US.UTF-8").
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
-RUN echo "export PATH=$PATH:/var/opt/bytebase/resources/postgres-linux-amd64-16/bin:/var/opt/bytebase/resources/postgres-linux-arm64-16/bin" >> /root/.bashrc
+ENV PATH="${PATH}:/var/opt/bytebase/resources/postgres-linux-amd64-16/bin:/var/opt/bytebase/resources/postgres-linux-arm64-16/bin"
# Copy utility scripts, we have
# - Demo script to launch Bytebase in readonly demo mode