diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e0c098d..7d1a0f43 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: # Autoformat: Python code - - repo: https://github.com/ambv/black + - repo: https://github.com/psf/black rev: 21.6b0 hooks: - id: black @@ -18,11 +18,11 @@ repos: # Lint: Dockerfile - repo: https://github.com/hadolint/hadolint.git - rev: v2.5.0 + rev: v2.6.0 hooks: - id: hadolint-docker # FIXME: remove after https://github.com/hadolint/hadolint/issues/628 is resolved - entry: hadolint/hadolint:v2.5.0 hadolint + entry: hadolint/hadolint:v2.6.0 hadolint # Lint: YAML - repo: https://github.com/adrienverge/yamllint.git diff --git a/Makefile b/Makefile index 35722294..5694b3a5 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ help: build/%: DARGS?= build/%: ## build the latest image for a stack - docker build $(DARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) + docker build $(DARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest --build-arg OWNER=$(OWNER) ./$(notdir $@) @echo -n "Built image size: " @docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}" diff --git a/README.md b/README.md index ac3b42ef..a023019a 100644 --- a/README.md +++ b/README.md @@ -104,3 +104,7 @@ This change is tracked in the issue [#1217](https://github.com/jupyter/docker-st - [Jupyter Discourse Forum](https://discourse.jupyter.org/) - [Jupyter Website](https://jupyter.org) - [Images on DockerHub](https://hub.docker.com/u/jupyter) + +## Architectures + +Currently published containers only support x86, some containers may support cross-building with docker buildx. diff --git a/all-spark-notebook/Dockerfile b/all-spark-notebook/Dockerfile index 077c8798..ec4eda92 100644 --- a/all-spark-notebook/Dockerfile +++ b/all-spark-notebook/Dockerfile @@ -1,6 +1,7 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -ARG BASE_CONTAINER=jupyter/pyspark-notebook +ARG OWNER=jupyter +ARG BASE_CONTAINER=$OWNER/pyspark-notebook FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index fa68e1eb..31d82d68 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -3,11 +3,9 @@ # Ubuntu 20.04 (focal) # https://hub.docker.com/_/ubuntu/?tab=tags&name=focal -# OS/ARCH: linux/amd64 ARG ROOT_CONTAINER=ubuntu:focal -ARG BASE_CONTAINER=$ROOT_CONTAINER -FROM $BASE_CONTAINER +FROM $ROOT_CONTAINER LABEL maintainer="Jupyter Project " ARG NB_USER="jovyan" @@ -27,19 +25,13 @@ USER root ARG conda_version="4.10.2" # Miniforge installer patch version ARG miniforge_patch_number="0" -# Miniforge installer architecture -ARG miniforge_arch="x86_64" # Package Manager and Python implementation to use (https://github.com/conda-forge/miniforge) # - conda only: either Miniforge3 to use Python or Miniforge-pypy3 to use PyPy # - conda + mamba: either Mambaforge to use Python or Mambaforge-pypy3 to use PyPy ARG miniforge_python="Mambaforge" - # Miniforge archive to install ARG miniforge_version="${conda_version}-${miniforge_patch_number}" -# Miniforge installer -ARG miniforge_installer="${miniforge_python}-${miniforge_version}-Linux-${miniforge_arch}.sh" -# Miniforge checksum -ARG miniforge_checksum="1e89ee86afa06e23b2478579be16a33fff6cff346314f6a6382fd20b1f83e669" + # Install all OS dependencies for notebook server that starts but lacks all # features (e.g., download as all possible file formats) @@ -104,8 +96,16 @@ RUN mkdir "/home/${NB_USER}/work" && \ WORKDIR /tmp # Prerequisites installation: conda, mamba, pip, tini -RUN wget --quiet "https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/${miniforge_installer}" && \ - echo "${miniforge_checksum} *${miniforge_installer}" | sha256sum --check && \ +RUN set -x && \ + # Miniforge installer + miniforge_arch=$(uname -m) && \ + export miniforge_arch && \ + if [ "$miniforge_arch" == "aarm64" ]; then \ + miniforge_arch="arm64"; \ + fi; \ + miniforge_installer="${miniforge_python}-${miniforge_version}-Linux-${miniforge_arch}.sh" && \ + export miniforge_installer && \ + wget --quiet "https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/${miniforge_installer}" && \ /bin/bash "${miniforge_installer}" -f -b -p "${CONDA_DIR}" && \ rm "${miniforge_installer}" && \ # Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html diff --git a/binder/Dockerfile b/binder/Dockerfile index 75fb0c34..d9f4a013 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -2,7 +2,8 @@ # Distributed under the terms of the Modified BSD License. # https://hub.docker.com/r/jupyter/base-notebook/tags -ARG BASE_CONTAINER=jupyter/base-notebook:33add21fab64 +ARG OWNER=jupyter +ARG BASE_CONTAINER=$OWNER/base-notebook:33add21fab64 FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " diff --git a/datascience-notebook/Dockerfile b/datascience-notebook/Dockerfile index ec25ab48..734fcae0 100644 --- a/datascience-notebook/Dockerfile +++ b/datascience-notebook/Dockerfile @@ -1,6 +1,7 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -ARG BASE_CONTAINER=jupyter/scipy-notebook +ARG OWNER=jupyter +ARG BASE_CONTAINER=$OWNER/scipy-notebook FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " diff --git a/docs/index.rst b/docs/index.rst index 65119716..9b42b9ac 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -44,6 +44,11 @@ Docker destroys the container after notebook server exit, but any files written docker run --rm -p 10000:8888 -e JUPYTER_ENABLE_LAB=yes -v "${PWD}":/home/jovyan/work jupyter/datascience-notebook:33add21fab64 +Architectures +----------- +Currently published containers only support x86, some containers may support cross-building with docker buildx. + + Table of Contents ----------------- diff --git a/docs/locale/en/LC_MESSAGES/index.po b/docs/locale/en/LC_MESSAGES/index.po index 97529148..4a534935 100644 --- a/docs/locale/en/LC_MESSAGES/index.po +++ b/docs/locale/en/LC_MESSAGES/index.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: docker-stacks latest\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-06-21 17:19+0000\n" +"POT-Creation-Date: 2021-07-08 14:06+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,44 +19,44 @@ msgstr "" "Generated-By: Babel 2.9.1\n" # 22f1bd46933144e092bf92e3af4c6f4f -#: ../../index.rst:50 206d746cbbe342cda0c4493ccb59abd6 +#: ../../index.rst:55 259addd8d90e4cbeab357be9823cac05 msgid "User Guide" msgstr "" # f35d75046f8c42ae8cab58d826154823 -#: ../../index.rst:60 31d02ffcf0e34bea8fc1baded2c08a47 +#: ../../index.rst:65 2479218777044cfdb444b6a7e9cd5971 msgid "Contributor Guide" msgstr "" # a737afe726cd49c4986d75b7d74eeed3 -#: ../../index.rst:73 80e7db5dc35640a6ba01b20d2cc3b20a +#: ../../index.rst:78 d089d107caef463c8e689748e60a47a7 msgid "Maintainer Guide" msgstr "" -#: ../../index.rst:79 +#: ../../index.rst:84 msgid "Issue Tracker on Github" msgstr "" -#: ../../index.rst:79 +#: ../../index.rst:84 msgid "Jupyter Discourse Forum" msgstr "" -#: ../../index.rst:79 +#: ../../index.rst:84 msgid "Jupyter Website" msgstr "" # 9cd216fa91ef40bbb957373faaf93732 -#: ../../index.rst:79 2ea0523f3631499382f7662f340c147b +#: ../../index.rst:84 7674c75edb8e4f02a4834ba9fe620933 msgid "Getting Help" msgstr "" # a0aa0bcd999c4c5e96cc57fd77780f96 -#: ../../index.rst:2 f1f51d536a99420abac00218cf41eb35 +#: ../../index.rst:2 a9c5366b811a4951b1a6d5edca0fea5c msgid "Jupyter Docker Stacks" msgstr "" # 5d06f458dc524214b2c97e865dd2dc81 -#: ../../index.rst:4 f38a09a8cf674ccc8fd29b525671a6ff +#: ../../index.rst:4 af64033317154bb69b9a295fe357741a msgid "" "Jupyter Docker Stacks are a set of ready-to-run Docker images containing " "Jupyter applications and interactive computing tools. You can use a stack" @@ -64,26 +64,26 @@ msgid "" msgstr "" # c69f151c806e4cdf9bebda05b06c760e -#: ../../index.rst:7 33ffc662a0874e708b34dc4ce9fced67 +#: ../../index.rst:7 b02d3a54f9434efabb9ec7cf44573954 msgid "Start a personal Jupyter Notebook server in a local Docker container" msgstr "" # b26271409ab743b2a349b3a8ca95233e -#: ../../index.rst:8 21a32796db4840a894fa7c604b3ae300 +#: ../../index.rst:8 657f4e715fe5481fb2c06edd5c6fa6b5 msgid "Run JupyterLab servers for a team using JupyterHub" msgstr "" # 4d60f4325fff4ffcad12703a4b9d6781 -#: ../../index.rst:9 0ca7e7c689564de0a575555277e82ade +#: ../../index.rst:9 faa40cd6f5694bbbaa1c71c8159b8811 msgid "Write your own project Dockerfile" msgstr "" # 78b0d31eb6e9462888eef92e6a84cdb7 -#: ../../index.rst:12 6389c5477bf942b7999d42b5e2e698ce +#: ../../index.rst:12 f0b4531077c34bf6bb2dc8b62b368cc9 msgid "Quick Start" msgstr "" -#: ../../index.rst:14 df6c516da7ed41cfad1e66f1a635484a +#: ../../index.rst:14 feff58d1445d4f96ab11966c9249526c msgid "" "You can try a `relatively recent build of the jupyter/base-notebook image" " on mybinder.org