Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(pg): use user bb to run bytebase and postgres server (#640)
Danny Xu1121d24d46ef
diff --git a/Dockerfile b/Dockerfileindex a3d6e52deb..8984a9ed1e 100644--- a/Dockerfile+++ b/Dockerfile@@ -61,13 +61,19 @@ LABEL org.opencontainers.image.authors=${BUILD_USER}COPY --from=backend /backend-build/bytebase /usr/local/bin/-# Directory to store the data, which can be referenced as the mounting point.-RUN mkdir -p /var/opt/bytebase-# Copy utility scripts, we have# - Demo script to launch Bytebase in readonly demo modeCOPY ./scripts /usr/local/bin/+# Create bb user for running Postgres database and server.+RUN addgroup -g 100 -S bb && adduser -u 100 -S -G bb bb++# Directory to store the data, which can be referenced as the mounting point.+RUN mkdir -p /var/opt/bytebase+RUN chown -R bb:bb /var/opt/bytebase++USER bb+CMD ["--host", "http://localhost", "--port", "80", "--data", "/var/opt/bytebase"]ENTRYPOINT ["bytebase"]diff --git a/Dockerfile.render b/Dockerfile.renderindex 7a45ff2879..ffe8f5b3fc 100644--- a/Dockerfile.render+++ b/Dockerfile.render@@ -61,9 +61,15 @@ LABEL org.opencontainers.image.authors=${BUILD_USER}COPY --from=backend /backend-build/bytebase /usr/local/bin/-# Directory to store the data, which can be referenced as the mounting point.-RUN mkdir -p /var/opt/bytebase-# Copy utility scripts, we have# - Demo script to launch Bytebase in readonly demo modeCOPY ./scripts /usr/local/bin/++# Create bb user for running Postgres database and server.+RUN addgroup -g 100 -S bb && adduser -u 100 -S -G bb bb++# Directory to store the data, which can be referenced as the mounting point.+RUN mkdir -p /var/opt/bytebase+RUN chown -R bb:bb /var/opt/bytebase++USER bb