Skip to content

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

fix: linux pg16 resource (#8807)

Danny Xud1f5ddcec2d2
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index a0087f2242..de5e982d4c 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -82,30 +82,27 @@ LABEL org.opencontainers.image.authors=${BUILD_USER}
# Create user "bytebase" for running Postgres database and server.
RUN addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase
-
# Directory to store the data, which can be referenced as the mounting point.
RUN mkdir -p /var/opt/bytebase
-
# Directory to store the demo data.
RUN mkdir -p /var/opt/bytebase/pgdata-demo
-
-ENV OPENSSL_CONF /etc/ssl/
-
-# Copy utility scripts, we have
-# - Demo script to launch Bytebase in readonly demo mode
-COPY ./scripts /usr/local/bin/
-COPY ./scripts/.psqlrc /root/.psqlrc
-
# Our HEALTHCHECK instruction in dockerfile needs curl.
# Install psmisc to use killall command in demo.sh used by render.com.
-RUN apt-get update && apt-get install -y locales curl psmisc postgresql-client procps libncurses5
+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
+# Copy utility scripts, we have
+# - Demo script to launch Bytebase in readonly demo mode
+COPY ./scripts /usr/local/bin/
+COPY ./scripts/.psqlrc /root/.psqlrc
COPY --from=backend /backend-build/bytebase /usr/local/bin/
COPY --from=backend /etc/ssl/certs /etc/ssl/certs
+ENV OPENSSL_CONF /etc/ssl/
+
CMD ["--port", "80", "--data", "/var/opt/bytebase"]
HEALTHCHECK --interval=5m --timeout=60s CMD curl -f http://localhost:80/healthz || exit 1
diff --git a/scripts/Dockerfile.depot b/scripts/Dockerfile.depot
index d1ec1fb215..15ffb531f6 100644
--- a/scripts/Dockerfile.depot
+++ b/scripts/Dockerfile.depot
@@ -56,30 +56,27 @@ LABEL org.opencontainers.image.authors=${BUILD_USER}
# Create user "bytebase" for running Postgres database and server.
RUN addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase
-
# Directory to store the data, which can be referenced as the mounting point.
RUN mkdir -p /var/opt/bytebase
-
# Directory to store the demo data.
RUN mkdir -p /var/opt/bytebase/pgdata-demo
-
-ENV OPENSSL_CONF /etc/ssl/
-
-# Copy utility scripts, we have
-# - Demo script to launch Bytebase in readonly demo mode
-COPY ./scripts /usr/local/bin/
-COPY ./scripts/.psqlrc /root/.psqlrc
-
# Our HEALTHCHECK instruction in dockerfile needs curl.
# Install psmisc to use killall command in demo.sh used by render.com.
-RUN apt-get update && apt-get install -y locales curl psmisc postgresql-client procps libncurses5
+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
+# Copy utility scripts, we have
+# - Demo script to launch Bytebase in readonly demo mode
+COPY ./scripts /usr/local/bin/
+COPY ./scripts/.psqlrc /root/.psqlrc
COPY --from=backend /backend-build/bytebase /usr/local/bin/
COPY --from=backend /etc/ssl/certs /etc/ssl/certs
+ENV OPENSSL_CONF /etc/ssl/
+
CMD ["--port", "80", "--data", "/var/opt/bytebase"]
HEALTHCHECK --interval=5m --timeout=60s CMD curl -f http://localhost:80/healthz || exit 1
diff --git a/scripts/Dockerfile.render-demo b/scripts/Dockerfile.render-demo
index 2deebd0c7e..ac7530a989 100644
--- a/scripts/Dockerfile.render-demo
+++ b/scripts/Dockerfile.render-demo
@@ -67,28 +67,26 @@ LABEL org.opencontainers.image.revision=${RENDER_GIT_COMMIT}
LABEL org.opencontainers.image.created=${BUILD_TIME}
LABEL org.opencontainers.image.authors=${BUILD_USER}
+# Create user "bytebase" for running Postgres database and server.
+RUN addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase
+# Directory to store the data, which can be referenced as the mounting point.
+RUN mkdir -p /var/opt/bytebase
+# Directory to store the demo data.
+RUN mkdir -p /var/opt/bytebase/pgdata-demo
# Our HEALTHCHECK instruction in dockerfile needs curl.
# Install psmisc to use killall command in demo.sh used by render.com.
-RUN apt-get update && apt-get install -y locales curl psmisc postgresql-client libncurses5
+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
-
-COPY --from=backend /backend-build/bytebase /usr/local/bin/
-COPY --from=backend /etc/ssl/certs /etc/ssl/certs
+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
# Copy utility scripts, we have
# - Demo script to launch Bytebase in readonly demo mode
COPY ./scripts /usr/local/bin/
-
-# Create user "bytebase" for running Postgres database and server.
-RUN addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase
-
-# Directory to store the data, which can be referenced as the mounting point.
-RUN mkdir -p /var/opt/bytebase
-
-# Directory to store the demo data.
-RUN mkdir -p /var/opt/bytebase/pgdata-demo
+COPY ./scripts/.psqlrc /root/.psqlrc
+COPY --from=backend /backend-build/bytebase /usr/local/bin/
+COPY --from=backend /etc/ssl/certs /etc/ssl/certs
ENV OPENSSL_CONF /etc/ssl/