Skip to content

Instantly share code, notes, and snippets.

@roymanigley
Created June 22, 2024 17:45
Show Gist options
  • Save roymanigley/92af08ef680329f0da91342b1fee6ad7 to your computer and use it in GitHub Desktop.
Save roymanigley/92af08ef680329f0da91342b1fee6ad7 to your computer and use it in GitHub Desktop.
Python - Jupiter Notebook using Docker
FROM python:3.9-alpine
RUN apk update && apk upgrade
RUN apk add gcc python3-dev musl-dev linux-headers
RUN pip install pip --upgrade
RUN pip install jupyter pandas matplotlib seaborn
RUN adduser -S jupyter
RUN mkdir /opt/jupyter
RUN chown jupyter /opt/jupyter -R
USER jupyter
WORKDIR /opt/jupyter
CMD jupyter notebook /opt/jupyter --ip 0.0.0.0 --port 8888 --NotebookApp.password='secret'
# docker build --tag jupyter-notebook . && \
# docker run --name jupyter-notebook -p 8888:8888 jupyter-notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment