-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Reapply "dbeaver/dbeaver-devops#1553 Added user dbeaver in dockerfile cloudbeaver (#3067)" This reverts commit a36a555. * dbeaver/dbeaver-devops#1553 updated base-java image with user * dbeaver/dbeaver-devops#1553 fixed user usage and ownership applying * dbeaver/dbeaver-devops#1553 changed GID UID * dbeaver/dbeaver-devops#1553 desc of chowner fixed * dbeaver/dbeaver-devops#1553 fixed user creation * dbeaver/dbeaver-devops#1553 Added creating dbeaver user in ce dockerfile * dbeaver/dbeaver-devops#1553 Removed comment * dbeaver/dbeaver-devops#1553 Removed comment * dbeaver/dbeaver-devops#1553 Rewrited comment * dbeaver/dbeaver-devops#1553 Replaced UID on user name --------- Co-authored-by: Greg Miller <[email protected]> Co-authored-by: Mikhailov Grigorii <[email protected]>
- Loading branch information
1 parent
cd901b9
commit ae1f0b7
Showing
3 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,24 @@ FROM dbeaver/base-java | |
|
||
MAINTAINER DBeaver Corp, [email protected] | ||
|
||
RUN apt-get update; \ | ||
apt-get upgrade -y; | ||
|
||
ENV DBEAVER_GID=8978 | ||
ENV DBEAVER_UID=8978 | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y | ||
|
||
RUN groupadd -g $DBEAVER_GID dbeaver && \ | ||
useradd -g $DBEAVER_GID -M -u $DBEAVER_UID -s /bin/bash dbeaver | ||
|
||
COPY cloudbeaver /opt/cloudbeaver | ||
COPY scripts/launch-product.sh /opt/cloudbeaver/launch-product.sh | ||
|
||
RUN chown -R $DBEAVER_UID:$DBEAVER_GID /opt/cloudbeaver | ||
|
||
EXPOSE 8978 | ||
RUN find /opt/cloudbeaver -type d -exec chmod 775 {} \; | ||
WORKDIR /opt/cloudbeaver/ | ||
ENTRYPOINT ["./run-server.sh"] | ||
|
||
RUN chmod +x "run-server.sh" "/opt/cloudbeaver/launch-product.sh" | ||
|
||
ENTRYPOINT ["./launch-product.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# This script is needed to change ownership and run the application as user dbeaver during the upgrade from version 24.2.0 | ||
|
||
# Change ownership of the WORKDIR to the dbeaver user and group | ||
# Variables DBEAVER_<UID|GID> are defined in the Dockerfile and exported to the runtime environment | ||
# PWD equals WORKDIR value from product Dockerfile | ||
chown -R $DBEAVER_UID:$DBEAVER_GID $PWD | ||
|
||
# Execute run-server.sh as the dbeaver user with the JAVA_HOME and PATH environment variables | ||
exec su dbeaver -c "JAVA_HOME=$JAVA_HOME PATH=$PATH ./run-server.sh" |