Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.25 KB

README.md

File metadata and controls

49 lines (37 loc) · 1.25 KB

Miniconda Dockerfile

Publish Docker image Lint Code Base

Build the base

docker build -t ubuntu-base \
  --build-arg USER_ID=$(id -u) \
  --build-arg GROUP_ID=$(id -g) \
  --target ubuntu-base .

Build the playground

docker build -t miniconda-base \
  --build-arg USER_ID=$(id -u) \
  --build-arg GROUP_ID=$(id -g) \
  --target playground .

Run

docker run -it \
  -p 8888:8888 \
  --name miniconda-playground \
  -v $(pwd):/home/user/notebooks \
  --workdir /home/user \
  miniconda-base:latest /bin/bash

Inside the container now:

user@4dd247b0f5e3:~$ source miniconda/bin/activate
(base) user@4dd247b0f5e3:~$ conda install jupyter -y
(base) user@4dd247b0f5e3:~$ jupyter notebook --notebook-dir=/home/user/notebooks --ip='*' --port=8888 --no-browser

or

jupyter lab --notebook-dir=/home/user/notebooks --ip='*' --port=8888 --no-browser

for jupyterlab experience

now the files in your host directory are of your host user.