Build and run the Docker containers:
docker compose up --build -d
Access Jupyter Notebook in your web browser at http://localhost:8888. Token is token.
# Use an official Jupyter Docker image as a parent image
FROM jupyter/base-notebook:latest
# Set environment variables
ENV JUPYTER_ENABLE_LAB: yes
ENV JUPYTER_TOKEN: token
ENV NB_USER: jupyternb
ENV NB_UID: 1000
ENV NB_GID: 100
ENV CHOWN_HOME: yes
ENV CHOWN_HOME_OPTS: -R
USER root
# Copy the Jupyter notebooks to the working directory
COPY . /home/jovyan/work
# Set the working directory
WORKDIR /home/jovyan/work
# Expose the port Jupyter uses
EXPOSE 8888
# Start Jupyter notebook
CMD ["start-notebook.sh"]
---
services:
jupyter:
build: .
container_name: jupyter-notebooks
ports:
- 8888:8888
volumes:
- .:/home/jovyan/work
command: "start-notebook.sh"
user: root
environment:
JUPYTER_ENABLE_LAB: yes
JUPYTER_TOKEN: token
NB_USER: jupyternb
NB_UID: 1000
NB_GID: 100
CHOWN_HOME: yes
CHOWN_HOME_OPTS: -R
Content type
Image
Digest
sha256:05d22228f…
Size
324.1 MB
Last updated
over 1 year ago
docker pull jakkph32/jupyter-docker-compose