-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from bento-platform/qa/v3.7
v3.7.4-rc1
- Loading branch information
Showing
11 changed files
with
111 additions
and
124 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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.vscode | ||
.DS_store | ||
.idea | ||
|
||
*/bin | ||
*/obj | ||
|
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 |
---|---|---|
@@ -1,16 +1,14 @@ | ||
ARG BASE_IMAGE | ||
ARG BASE_IMAGE_VERSION | ||
|
||
FROM "${BASE_IMAGE}:${BASE_IMAGE_VERSION}" | ||
FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION} | ||
|
||
ARG HOST_USER_UID | ||
ARG HOST_USER_GID | ||
ARG OS_NAME | ||
RUN if [ $OS_NAME != darwin ]; \ | ||
then groupadd --system elasticsearchgroup -g $HOST_USER_GID || true; \ | ||
else groupadd --system elasticsearchgroup || true; \ | ||
fi && \ | ||
usermod -a -G elasticsearchgroup elasticsearch || true | ||
# note: ' || true' ignores possible minor errors | ||
RUN apt-get update -y && \ | ||
apt-get install -y bash gosu && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
USER elasticsearch | ||
COPY gohan_create_service_user.bash /gohan_create_service_user.bash | ||
COPY gohan_entrypoint.bash /gohan_entrypoint.bash | ||
|
||
ENTRYPOINT ["/bin/bash", "/gohan_entrypoint.bash"] | ||
CMD ["/usr/local/bin/docker-entrypoint.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 | ||
|
||
# If set, use the local UID from outside the container (or default to 1001; 1000 is already created by the | ||
# Elasticsearch container) | ||
USER_ID=${BENTO_UID:-1001} | ||
|
||
echo "[gohan_elasticsearch] [/gohan_create_service_user.bash] using USER_ID=${USER_ID}" | ||
|
||
# Add the user | ||
useradd --shell /bin/bash -u "${USER_ID}" --non-unique -c "Bento container user" -m gohan_user | ||
export HOME=/home/gohan_user |
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,13 @@ | ||
#!/bin/bash | ||
|
||
source /gohan_create_service_user.bash | ||
|
||
# Fix permissions on Elasticsearch directories | ||
# See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docker.html#_configuration_files_must_be_readable_by_the_elasticsearch_user | ||
# - except we use a different user! | ||
chown -R gohan_user:gohan_user /usr/share/elasticsearch/config | ||
chown -R gohan_user:gohan_user /usr/share/elasticsearch/data | ||
chown -R gohan_user:gohan_user /usr/share/elasticsearch/logs | ||
|
||
# Drop into gohan_user from root and execute the CMD specified for the image | ||
exec gosu gohan_user "$@" |
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
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