-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mongo-express for v1.0.2 #15991
Update mongo-express for v1.0.2 #15991
Conversation
1ef9829
to
e13530f
Compare
This comment has been minimized.
This comment has been minimized.
Current failure is probably because we haven't merged the upstream changes in mongo-express/mongo-express-docker#108 yet. |
This comment has been minimized.
This comment has been minimized.
Invalid 'FROM' + 'Architectures' combinations detected: - mongo-express:1.0.2 (FROM node:18-alpine3.17) -- completely unsupported base! - mongo-express:1.0.2-20 (FROM node:20-alpine3.17) -- completely unsupported base!
Looks like we can't support alpine 3.17 anymore. That's kinda weird because alpine 3.17 should still be supported for another 10 months according to https://endoflife.date/alpine |
This comment has been minimized.
This comment has been minimized.
Was going to make a few review comments, but figured they'd be easier to digest as a PR: mongo-express/mongo-express-docker#109 👍 ❤️ |
This comment has been minimized.
This comment has been minimized.
We need to update this after mongo-express/mongo-express-docker#101 lands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to get the entrypoint changes in
I think I must be mis-reading mongo-express/mongo-express-docker#101 -- it seems like that's just re-enabling the "wait for MongoDB at startup" logic? Not sure why that's blocking 😅 |
This comment has been minimized.
This comment has been minimized.
We are missing the latest tag because we had it on alpine 1.17. I'll update to add alpine 1.19 and move the latest tag to 1.18. |
Diff for 7a4a3a5:diff --git a/_bashbrew-cat b/_bashbrew-cat
index eaae1f5..7edba38 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,23 +1,23 @@
Maintainers: Nick Cox <[email protected]> (@knickers), John Steel <[email protected]> (@BlackthornYugen)
GitRepo: https://github.com/mongo-express/mongo-express-docker.git
-GitCommit: 0b9b935b188caa945834a27f7475a059c4e60b13
+GitCommit: 17e28157629b3ead64b9086154b1cbe9cfe62807
-Tags: 1.0.0, 1.0, 1, 1.0.0-18, 1.0-18, 1-18, 1.0.0-18-alpine3.17, 1.0-18-alpine3.17, 1-18-alpine3.17, latest
+Tags: 1.0.2, 1.0, 1, 1.0.2-18, 1.0-18, 1-18, 1.0.2-18-alpine3.18, 1.0-18-alpine3.18, 1-18-alpine3.18, latest
Architectures: amd64, arm64v8
-GitCommit: 5fb537b2fd181e458f58137fdb55d061a8c23da5
-Directory: 1.0/18-alpine3.17
-
-Tags: 1.0.0-18-alpine3.18, 1.0-18-alpine3.18, 1-18-alpine3.18
-Architectures: amd64, arm64v8
-GitCommit: 5fb537b2fd181e458f58137fdb55d061a8c23da5
+GitCommit: 242d80ba5c3a61e9877d245c5352938a129d82a7
Directory: 1.0/18-alpine3.18
-Tags: 1.0.0-20, 1.0-20, 1-20, 1.0.0-20-alpine3.17, 1.0-20-alpine3.17, 1-20-alpine3.17
+Tags: 1.0.2-18-alpine3.19, 1.0-18-alpine3.19, 1-18-alpine3.19
Architectures: amd64, arm64v8
-GitCommit: 5fb537b2fd181e458f58137fdb55d061a8c23da5
-Directory: 1.0/20-alpine3.17
+GitCommit: 8a4ce8a2b042efd2a8e70f3127d8bd330dc3bb74
+Directory: 1.0/18-alpine3.19
-Tags: 1.0.0-20-alpine3.18, 1.0-20-alpine3.18, 1-20-alpine3.18
+Tags: 1.0.2-20, 1.0-20, 1-20, 1.0.2-20-alpine3.18, 1.0-20-alpine3.18, 1-20-alpine3.18
Architectures: amd64, arm64v8
-GitCommit: 5fb537b2fd181e458f58137fdb55d061a8c23da5
+GitCommit: 242d80ba5c3a61e9877d245c5352938a129d82a7
Directory: 1.0/20-alpine3.18
+
+Tags: 1.0.2-20-alpine3.19, 1.0-20-alpine3.19, 1-20-alpine3.19
+Architectures: amd64, arm64v8
+GitCommit: 8a4ce8a2b042efd2a8e70f3127d8bd330dc3bb74
+Directory: 1.0/20-alpine3.19
diff --git a/_bashbrew-list b/_bashbrew-list
index fc9ea53..ff94a71 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,22 +1,22 @@
mongo-express:1
mongo-express:1-18
-mongo-express:1-18-alpine3.17
mongo-express:1-18-alpine3.18
+mongo-express:1-18-alpine3.19
mongo-express:1-20
-mongo-express:1-20-alpine3.17
mongo-express:1-20-alpine3.18
+mongo-express:1-20-alpine3.19
mongo-express:1.0
mongo-express:1.0-18
-mongo-express:1.0-18-alpine3.17
mongo-express:1.0-18-alpine3.18
+mongo-express:1.0-18-alpine3.19
mongo-express:1.0-20
-mongo-express:1.0-20-alpine3.17
mongo-express:1.0-20-alpine3.18
-mongo-express:1.0.0
-mongo-express:1.0.0-18
-mongo-express:1.0.0-18-alpine3.17
-mongo-express:1.0.0-18-alpine3.18
-mongo-express:1.0.0-20
-mongo-express:1.0.0-20-alpine3.17
-mongo-express:1.0.0-20-alpine3.18
+mongo-express:1.0-20-alpine3.19
+mongo-express:1.0.2
+mongo-express:1.0.2-18
+mongo-express:1.0.2-18-alpine3.18
+mongo-express:1.0.2-18-alpine3.19
+mongo-express:1.0.2-20
+mongo-express:1.0.2-20-alpine3.18
+mongo-express:1.0.2-20-alpine3.19
mongo-express:latest
diff --git a/mongo-express_1-18-alpine3.18/Dockerfile b/mongo-express_1-18-alpine3.19/Dockerfile
similarity index 51%
rename from mongo-express_1-18-alpine3.18/Dockerfile
rename to mongo-express_1-18-alpine3.19/Dockerfile
index 744abee..98e048b 100644
--- a/mongo-express_1-18-alpine3.18/Dockerfile
+++ b/mongo-express_1-18-alpine3.19/Dockerfile
@@ -6,23 +6,33 @@
# https://nodejs.org/en/about/releases/
# https://github.com/nodejs/Release#readme
-FROM node:18-alpine3.18
-
-# override some config defaults with values that will work better for docker
-ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
- ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
- VCAP_APP_HOST="0.0.0.0"
-
-ENV MONGO_EXPRESS_VERSION=1.0.0
+FROM node:18-alpine3.19
RUN set -eux; \
- yarn add mongo-express@${MONGO_EXPRESS_VERSION}; \
- apk -U add --no-cache \
+ apk add --no-cache \
bash \
# grab tini for signal processing and zombie killing
tini
-WORKDIR /node_modules/mongo-express
+WORKDIR /app
+
+ARG MONGO_EXPRESS_REPOSITORY=mongo-express/mongo-express
+ARG MONGO_EXPRESS_VERSION=release/v1.0.2
+
+RUN set -eux; \
+ apk add --no-cache --virtual .me-fetch-deps git; \
+ git clone --depth 1 --branch "$MONGO_EXPRESS_VERSION" -c advice.detachedHead=false https://github.com/$MONGO_EXPRESS_REPOSITORY.git .; \
+ export DISABLE_V8_COMPILE_CACHE=1; \
+ yarn install; \
+ yarn build; \
+ apk del --no-network .me-fetch-deps; \
+ rm -rf .git* ~/.cache ~/.yarn
+
+# override some config defaults with values that will work better for docker
+ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
+ ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
+ ME_CONFIG_SITE_SESSIONSECRET="secret" \
+ VCAP_APP_HOST="0.0.0.0"
EXPOSE 8081
COPY docker-entrypoint.sh /
diff --git a/mongo-express_1-20-alpine3.17/docker-entrypoint.sh b/mongo-express_1-18-alpine3.19/docker-entrypoint.sh
similarity index 73%
rename from mongo-express_1-20-alpine3.17/docker-entrypoint.sh
rename to mongo-express_1-18-alpine3.19/docker-entrypoint.sh
index 185b3b9..7ae1374 100755
--- a/mongo-express_1-20-alpine3.17/docker-entrypoint.sh
+++ b/mongo-express_1-18-alpine3.19/docker-entrypoint.sh
@@ -9,7 +9,7 @@ fi
function wait_tcp_port {
local host="$1" port="$2"
- local max_tries=5 tries=1
+ local max_tries="$3" tries=1
# see http://tldp.org/LDP/abs/html/devref1.html for description of this syntax.
while ! exec 6<>/dev/tcp/$host/$port && [[ $tries -lt $max_tries ]]; do
@@ -25,11 +25,12 @@ function wait_tcp_port {
# is required for checking port health
# if ME_CONFIG_MONGODB_SERVER has a comma in it, we're pointing to a replica set (https://github.com/mongo-express/mongo-express-docker/issues/21)
-# if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
-# # wait for the mongo server to be available
-# echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
-# wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}"
-# fi
+
+if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
+ # wait for the mongo server to be available
+ echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
+ wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}" "${ME_CONFIG_CONNECT_RETRIES:-5}"
+fi
# run mongo-express
exec node app
diff --git a/mongo-express_1-20-alpine3.18/Dockerfile b/mongo-express_1-20-alpine3.18/Dockerfile
index ed08825..337c78f 100644
--- a/mongo-express_1-20-alpine3.18/Dockerfile
+++ b/mongo-express_1-20-alpine3.18/Dockerfile
@@ -8,21 +8,31 @@
# https://github.com/nodejs/Release#readme
FROM node:20-alpine3.18
-# override some config defaults with values that will work better for docker
-ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
- ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
- VCAP_APP_HOST="0.0.0.0"
-
-ENV MONGO_EXPRESS_VERSION=1.0.0
-
RUN set -eux; \
- yarn add mongo-express@${MONGO_EXPRESS_VERSION}; \
- apk -U add --no-cache \
+ apk add --no-cache \
bash \
# grab tini for signal processing and zombie killing
tini
-WORKDIR /node_modules/mongo-express
+WORKDIR /app
+
+ARG MONGO_EXPRESS_REPOSITORY=mongo-express/mongo-express
+ARG MONGO_EXPRESS_VERSION=release/v1.0.2
+
+RUN set -eux; \
+ apk add --no-cache --virtual .me-fetch-deps git; \
+ git clone --depth 1 --branch "$MONGO_EXPRESS_VERSION" -c advice.detachedHead=false https://github.com/$MONGO_EXPRESS_REPOSITORY.git .; \
+ export DISABLE_V8_COMPILE_CACHE=1; \
+ yarn install; \
+ yarn build; \
+ apk del --no-network .me-fetch-deps; \
+ rm -rf .git* ~/.cache ~/.yarn
+
+# override some config defaults with values that will work better for docker
+ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
+ ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
+ ME_CONFIG_SITE_SESSIONSECRET="secret" \
+ VCAP_APP_HOST="0.0.0.0"
EXPOSE 8081
COPY docker-entrypoint.sh /
diff --git a/mongo-express_1-20-alpine3.18/docker-entrypoint.sh b/mongo-express_1-20-alpine3.18/docker-entrypoint.sh
index 185b3b9..7ae1374 100755
--- a/mongo-express_1-20-alpine3.18/docker-entrypoint.sh
+++ b/mongo-express_1-20-alpine3.18/docker-entrypoint.sh
@@ -9,7 +9,7 @@ fi
function wait_tcp_port {
local host="$1" port="$2"
- local max_tries=5 tries=1
+ local max_tries="$3" tries=1
# see http://tldp.org/LDP/abs/html/devref1.html for description of this syntax.
while ! exec 6<>/dev/tcp/$host/$port && [[ $tries -lt $max_tries ]]; do
@@ -25,11 +25,12 @@ function wait_tcp_port {
# is required for checking port health
# if ME_CONFIG_MONGODB_SERVER has a comma in it, we're pointing to a replica set (https://github.com/mongo-express/mongo-express-docker/issues/21)
-# if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
-# # wait for the mongo server to be available
-# echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
-# wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}"
-# fi
+
+if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
+ # wait for the mongo server to be available
+ echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
+ wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}" "${ME_CONFIG_CONNECT_RETRIES:-5}"
+fi
# run mongo-express
exec node app
diff --git a/mongo-express_1-20-alpine3.17/Dockerfile b/mongo-express_1-20-alpine3.19/Dockerfile
similarity index 51%
rename from mongo-express_1-20-alpine3.17/Dockerfile
rename to mongo-express_1-20-alpine3.19/Dockerfile
index 92e363c..f176f42 100644
--- a/mongo-express_1-20-alpine3.17/Dockerfile
+++ b/mongo-express_1-20-alpine3.19/Dockerfile
@@ -6,23 +6,33 @@
# https://nodejs.org/en/about/releases/
# https://github.com/nodejs/Release#readme
-FROM node:20-alpine3.17
-
-# override some config defaults with values that will work better for docker
-ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
- ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
- VCAP_APP_HOST="0.0.0.0"
-
-ENV MONGO_EXPRESS_VERSION=1.0.0
+FROM node:20-alpine3.19
RUN set -eux; \
- yarn add mongo-express@${MONGO_EXPRESS_VERSION}; \
- apk -U add --no-cache \
+ apk add --no-cache \
bash \
# grab tini for signal processing and zombie killing
tini
-WORKDIR /node_modules/mongo-express
+WORKDIR /app
+
+ARG MONGO_EXPRESS_REPOSITORY=mongo-express/mongo-express
+ARG MONGO_EXPRESS_VERSION=release/v1.0.2
+
+RUN set -eux; \
+ apk add --no-cache --virtual .me-fetch-deps git; \
+ git clone --depth 1 --branch "$MONGO_EXPRESS_VERSION" -c advice.detachedHead=false https://github.com/$MONGO_EXPRESS_REPOSITORY.git .; \
+ export DISABLE_V8_COMPILE_CACHE=1; \
+ yarn install; \
+ yarn build; \
+ apk del --no-network .me-fetch-deps; \
+ rm -rf .git* ~/.cache ~/.yarn
+
+# override some config defaults with values that will work better for docker
+ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
+ ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
+ ME_CONFIG_SITE_SESSIONSECRET="secret" \
+ VCAP_APP_HOST="0.0.0.0"
EXPOSE 8081
COPY docker-entrypoint.sh /
diff --git a/mongo-express_1-18-alpine3.18/docker-entrypoint.sh b/mongo-express_1-20-alpine3.19/docker-entrypoint.sh
similarity index 73%
rename from mongo-express_1-18-alpine3.18/docker-entrypoint.sh
rename to mongo-express_1-20-alpine3.19/docker-entrypoint.sh
index 185b3b9..7ae1374 100755
--- a/mongo-express_1-18-alpine3.18/docker-entrypoint.sh
+++ b/mongo-express_1-20-alpine3.19/docker-entrypoint.sh
@@ -9,7 +9,7 @@ fi
function wait_tcp_port {
local host="$1" port="$2"
- local max_tries=5 tries=1
+ local max_tries="$3" tries=1
# see http://tldp.org/LDP/abs/html/devref1.html for description of this syntax.
while ! exec 6<>/dev/tcp/$host/$port && [[ $tries -lt $max_tries ]]; do
@@ -25,11 +25,12 @@ function wait_tcp_port {
# is required for checking port health
# if ME_CONFIG_MONGODB_SERVER has a comma in it, we're pointing to a replica set (https://github.com/mongo-express/mongo-express-docker/issues/21)
-# if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
-# # wait for the mongo server to be available
-# echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
-# wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}"
-# fi
+
+if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
+ # wait for the mongo server to be available
+ echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
+ wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}" "${ME_CONFIG_CONNECT_RETRIES:-5}"
+fi
# run mongo-express
exec node app
diff --git a/mongo-express_latest/Dockerfile b/mongo-express_latest/Dockerfile
index 9e05d4c..41de615 100644
--- a/mongo-express_latest/Dockerfile
+++ b/mongo-express_latest/Dockerfile
@@ -6,23 +6,33 @@
# https://nodejs.org/en/about/releases/
# https://github.com/nodejs/Release#readme
-FROM node:18-alpine3.17
-
-# override some config defaults with values that will work better for docker
-ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
- ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
- VCAP_APP_HOST="0.0.0.0"
-
-ENV MONGO_EXPRESS_VERSION=1.0.0
+FROM node:18-alpine3.18
RUN set -eux; \
- yarn add mongo-express@${MONGO_EXPRESS_VERSION}; \
- apk -U add --no-cache \
+ apk add --no-cache \
bash \
# grab tini for signal processing and zombie killing
tini
-WORKDIR /node_modules/mongo-express
+WORKDIR /app
+
+ARG MONGO_EXPRESS_REPOSITORY=mongo-express/mongo-express
+ARG MONGO_EXPRESS_VERSION=release/v1.0.2
+
+RUN set -eux; \
+ apk add --no-cache --virtual .me-fetch-deps git; \
+ git clone --depth 1 --branch "$MONGO_EXPRESS_VERSION" -c advice.detachedHead=false https://github.com/$MONGO_EXPRESS_REPOSITORY.git .; \
+ export DISABLE_V8_COMPILE_CACHE=1; \
+ yarn install; \
+ yarn build; \
+ apk del --no-network .me-fetch-deps; \
+ rm -rf .git* ~/.cache ~/.yarn
+
+# override some config defaults with values that will work better for docker
+ENV ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
+ ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
+ ME_CONFIG_SITE_SESSIONSECRET="secret" \
+ VCAP_APP_HOST="0.0.0.0"
EXPOSE 8081
COPY docker-entrypoint.sh /
diff --git a/mongo-express_latest/docker-entrypoint.sh b/mongo-express_latest/docker-entrypoint.sh
index 185b3b9..7ae1374 100755
--- a/mongo-express_latest/docker-entrypoint.sh
+++ b/mongo-express_latest/docker-entrypoint.sh
@@ -9,7 +9,7 @@ fi
function wait_tcp_port {
local host="$1" port="$2"
- local max_tries=5 tries=1
+ local max_tries="$3" tries=1
# see http://tldp.org/LDP/abs/html/devref1.html for description of this syntax.
while ! exec 6<>/dev/tcp/$host/$port && [[ $tries -lt $max_tries ]]; do
@@ -25,11 +25,12 @@ function wait_tcp_port {
# is required for checking port health
# if ME_CONFIG_MONGODB_SERVER has a comma in it, we're pointing to a replica set (https://github.com/mongo-express/mongo-express-docker/issues/21)
-# if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
-# # wait for the mongo server to be available
-# echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
-# wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}"
-# fi
+
+if [[ "$ME_CONFIG_MONGODB_SERVER" != *,* ]]; then
+ # wait for the mongo server to be available
+ echo Waiting for ${ME_CONFIG_MONGODB_SERVER}:${ME_CONFIG_MONGODB_PORT:-27017}...
+ wait_tcp_port "${ME_CONFIG_MONGODB_SERVER}" "${ME_CONFIG_MONGODB_PORT:-27017}" "${ME_CONFIG_CONNECT_RETRIES:-5}"
+fi
# run mongo-express
exec node app Relevant Maintainers:
|
Not gonna block the merge on it (obviously 😁), but just want to double check that it's intentional for |
I did that on purpose. Wanted to keep changes small. 🙂 |
Related pull requests:
mongo-express/mongo-express-docker#107
mongo-express/mongo-express-docker#108
Full release notes available here:
v1.0.1 - Convert to ESM
v1.0.2