@@ -259,38 +259,30 @@ RUN rm /etc/dpkg/dpkg.cfg.d/excludes \
259
259
&& apt-get clean \
260
260
&& rm -rf /var/lib/apt/lists/*
261
261
262
- # Workaround for a mandb bug, should be fixed in mandb > 2.8.5
263
- # https://git.savannah.gnu.org/cgit/man-db.git/commit/?id=8197d7824f814c5d4b992b4c8730b5b0f7ec589a
264
- RUN echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/man" >> /etc/manpath.config \
265
- && echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/share/man" >> /etc/manpath.config \
266
- && mandb
267
-
268
262
USER $NB_UID
269
263
```
270
264
271
265
Adding the documentation on top of an existing singleuser image wastes a lot of space and requires
272
266
reinstalling every system package, which can take additional time and bandwidth; the
273
267
` datascience-notebook ` image has been shown to grow by almost 3GB when adding manapages in this way.
274
- Enabling manpages in the base Ubuntu layer prevents this container bloat:
268
+ Enabling manpages in the base Ubuntu layer prevents this container bloat.
269
+ Just use previous ` Dockerfile ` with original ubuntu image as your base container:
275
270
276
- ``` Dockerfile
277
- # Ubuntu 18.04 (bionic) from 2018-05-26
278
- # https://github.com/docker-library/official-images/commit/aac6a45b9eb2bffb8102353c350d341a410fb169
279
- ARG BASE_CONTAINER=ubuntu:bionic-20180526@sha256:c8c275751219dadad8fa56b3ac41ca6cb22219ff117ca98fe82b42f24e1ba64e
280
- FROM $BASE_CONTAINER
281
-
282
- ENV DEBIAN_FRONTEND noninteractive
283
- # Remove the manpage blacklist, install man, install docs
284
- RUN rm /etc/dpkg/dpkg.cfg.d/excludes \
285
- && apt-get update \
286
- && dpkg -l | grep ^ii | cut -d' ' -f3 | xargs apt-get install -yq --no-install-recommends --reinstall man \
287
- && apt-get clean \
288
- && rm -rf /var/lib/apt/lists/*
271
+ ``` dockerfile
272
+ # Ubuntu 20.04 (focal) from 2020-04-23
273
+ # https://github.com/docker-library/official-images/commit/4475094895093bcc29055409494cce1e11b52f94
274
+ ARG BASE_CONTAINER=ubuntu:focal-20200423@sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f
275
+ ```
289
276
290
- # Workaround for a mandb bug, should be fixed in mandb > 2.8.5
277
+ For Ubuntu 18.04 (bionic) and earlier, you may also require to workaround for a mandb bug, which was fixed in mandb >= 2.8.6.1:
278
+ ``` dockerfile
291
279
# https://git.savannah.gnu.org/cgit/man-db.git/commit/?id=8197d7824f814c5d4b992b4c8730b5b0f7ec589a
292
- RUN echo "MANPATH_MAP /opt/conda/bin /opt/conda/man" >> /etc/manpath.config \
293
- && echo "MANPATH_MAP /opt/conda/bin /opt/conda/share/man" >> /etc/manpath.config
280
+ # http://launchpadlibrarian.net/435841763/man-db_2.8.5-2_2.8.6-1.diff.gz
281
+
282
+ RUN echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/man" >> /etc/manpath.config \
283
+ && echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/share/man" >> /etc/manpath.config \
284
+ && mandb
285
+
294
286
```
295
287
296
288
Be sure to check the current base image in ` base-notebook ` before building.
0 commit comments