-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
4.0.dockerfile
20 lines (16 loc) · 942 Bytes
/
4.0.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM registry.gitlab.com/tozd/docker/dinit:ubuntu-bionic
EXPOSE 27017/tcp
VOLUME /var/lib/mongodb
VOLUME /var/log/mongod
# We use a workaround for /usr/bin/systemctl which seems this package requires during install.
# It also sets trusted=yes because the key has expired.
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 && \
echo "deb [trusted=yes] http://repo.mongodb.org/apt/ubuntu $(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d= -f2)/mongodb-org/4.0 multiverse" > /etc/apt/sources.list.d/mongodb.list && \
apt-get update -q -q && \
ln -s /bin/true /usr/bin/systemctl && \
apt-get install --yes --force-yes mongodb-org && \
rm /usr/bin/systemctl && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
COPY ./etc/service/mongod /etc/service/mongod
COPY ./log-3.0 /etc/service/mongod/log
COPY ./etc/mongodb.conf /etc/mongodb.conf