Skip to content

Commit bc7b2d0

Browse files
committed
Keep the systemctl workaround always -- it's included in the new 3.6.22...
1 parent 2914dde commit bc7b2d0

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed

3.6/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,15 @@ RUN set -x \
8787
# installing "mongodb-enterprise" pulls in "tzdata" which prompts for input
8888
&& export DEBIAN_FRONTEND=noninteractive \
8989
&& apt-get update \
90+
# starting with MongoDB 4.3 (and backported to 4.0 and 4.2 *and* 3.6??), the postinst for server includes an unconditional "systemctl daemon-reload" (and we don't have anything for "systemctl" to talk to leading to dbus errors and failed package installs)
91+
&& ln -s /bin/true /usr/local/bin/systemctl \
9092
&& apt-get install -y \
9193
${MONGO_PACKAGE}=$MONGO_VERSION \
9294
${MONGO_PACKAGE}-server=$MONGO_VERSION \
9395
${MONGO_PACKAGE}-shell=$MONGO_VERSION \
9496
${MONGO_PACKAGE}-mongos=$MONGO_VERSION \
9597
${MONGO_PACKAGE}-tools=$MONGO_VERSION \
98+
&& rm -f /usr/local/bin/systemctl \
9699
&& rm -rf /var/lib/apt/lists/* \
97100
&& rm -rf /var/lib/mongodb \
98101
&& mv /etc/mongod.conf /etc/mongod.conf.orig

4.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN set -x \
8787
# installing "mongodb-enterprise" pulls in "tzdata" which prompts for input
8888
&& export DEBIAN_FRONTEND=noninteractive \
8989
&& apt-get update \
90-
# starting with MongoDB 4.3, the postinst for server includes "systemctl daemon-reload" (and we don't have "systemctl")
90+
# starting with MongoDB 4.3 (and backported to 4.0 and 4.2 *and* 3.6??), the postinst for server includes an unconditional "systemctl daemon-reload" (and we don't have anything for "systemctl" to talk to leading to dbus errors and failed package installs)
9191
&& ln -s /bin/true /usr/local/bin/systemctl \
9292
&& apt-get install -y \
9393
${MONGO_PACKAGE}=$MONGO_VERSION \

4.2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN set -x \
8787
# installing "mongodb-enterprise" pulls in "tzdata" which prompts for input
8888
&& export DEBIAN_FRONTEND=noninteractive \
8989
&& apt-get update \
90-
# starting with MongoDB 4.3, the postinst for server includes "systemctl daemon-reload" (and we don't have "systemctl")
90+
# starting with MongoDB 4.3 (and backported to 4.0 and 4.2 *and* 3.6??), the postinst for server includes an unconditional "systemctl daemon-reload" (and we don't have anything for "systemctl" to talk to leading to dbus errors and failed package installs)
9191
&& ln -s /bin/true /usr/local/bin/systemctl \
9292
&& apt-get install -y \
9393
${MONGO_PACKAGE}=$MONGO_VERSION \

4.4/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN set -x \
8787
# installing "mongodb-enterprise" pulls in "tzdata" which prompts for input
8888
&& export DEBIAN_FRONTEND=noninteractive \
8989
&& apt-get update \
90-
# starting with MongoDB 4.3, the postinst for server includes "systemctl daemon-reload" (and we don't have "systemctl")
90+
# starting with MongoDB 4.3 (and backported to 4.0 and 4.2 *and* 3.6??), the postinst for server includes an unconditional "systemctl daemon-reload" (and we don't have anything for "systemctl" to talk to leading to dbus errors and failed package installs)
9191
&& ln -s /bin/true /usr/local/bin/systemctl \
9292
&& apt-get install -y \
9393
${MONGO_PACKAGE}=$MONGO_VERSION \

Dockerfile-linux.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN set -x \
8787
# installing "mongodb-enterprise" pulls in "tzdata" which prompts for input
8888
&& export DEBIAN_FRONTEND=noninteractive \
8989
&& apt-get update \
90-
# starting with MongoDB 4.3, the postinst for server includes "systemctl daemon-reload" (and we don't have "systemctl")
90+
# starting with MongoDB 4.3 (and backported to 4.0 and 4.2 *and* 3.6??), the postinst for server includes an unconditional "systemctl daemon-reload" (and we don't have anything for "systemctl" to talk to leading to dbus errors and failed package installs)
9191
&& ln -s /bin/true /usr/local/bin/systemctl \
9292
&& apt-get install -y \
9393
${MONGO_PACKAGE}=$MONGO_VERSION \

update.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,6 @@ for version in "${versions[@]}"; do
160160
Dockerfile-linux.template \
161161
> "$version/Dockerfile"
162162

163-
# starting with MongoDB 4.3 (and backported to 4.0 and 4.2??), the postinst for server includes an unconditional "systemctl daemon-reload" (and we don't have anything for "systemctl" to talk to leading to dbus errors and failed package installs)
164-
case "$version" in
165-
3.6)
166-
sed -i -e '/systemctl/d' "$version/Dockerfile"
167-
;;
168-
esac
169-
170163
cp -a docker-entrypoint.sh "$version/"
171164

172165
windowsMsi="$(

0 commit comments

Comments
 (0)