version: '3'
services:
  shell:
    build: .
    image: eemeter_shell
    stdin_open: true
    tty: true
    entrypoint: /bin/sh
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  docs:
    image: eemeter_shell
    ports:
      - "${HOST_PORT_DOCS:-8000}:8000"
    entrypoint: make -C docs livehtml
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  test:
    image: eemeter_shell
    entrypoint: py.test -n0
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  jupyter:
    image: eemeter_shell
    ports:
      - "${HOST_PORT_JUPYTER:-8888}:${HOST_PORT_JUPYTER:-8888}"
    entrypoint: |
      jupyter lab scripts/ --ip=0.0.0.0 --port=${HOST_PORT_JUPYTER:-8888} --allow-root --no-browser
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  pipenv:
    image: eemeter_shell
    entrypoint: pipenv
    volumes:
      - .:/app

  blacken:
    image: eemeter_shell
    entrypoint: black .
    volumes:
      - .:/app

version: '3'
services:
  shell:
    build: .
    image: eemeter_shell
    stdin_open: true
    tty: true
    entrypoint: /bin/sh
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  docs:
    image: eemeter_shell
    ports:
      - "${HOST_PORT_DOCS:-8000}:8000"
    entrypoint: make -C docs livehtml
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  test:
    image: eemeter_shell
    entrypoint: py.test -n0
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  jupyter:
    image: eemeter_shell
    ports:
      - "${HOST_PORT_JUPYTER:-8888}:${HOST_PORT_JUPYTER:-8888}"
    entrypoint: |
      jupyter lab scripts/ --ip=0.0.0.0 --port=${HOST_PORT_JUPYTER:-8888} --allow-root --no-browser
    volumes:
      - .:/app
      - /app/tests/__pycache__/

  pipenv:
    image: eemeter_shell
    entrypoint: pipenv
    environment:
      - PIPENV_CACHE_DIR=/app/.docker-pipenv-cache  # if you get weird caching behavior remove this dir
    volumes:
      - .:/app

  blacken:
    image: eemeter_shell
    entrypoint: black .
    volumes:
      - .:/app

Add external cache for pipenv
Add external cache for pipenv
