0

I am having problems running docker compose (the yaml file later). It should build three containers: Jupyter, mlflow and postgres but for some reason it only builds postgress.

The error message is

Building mlflow
[+] Building 0.7s (5/9)                                                                                                                    
 => [internal] load build definition from Dockerfile                                                                                  0.0s
 => => transferring dockerfile: 38B                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                     0.0s
 => => transferring context: 34B                                                                                                      0.0s
 => ERROR [internal] load metadata for docker.io/library/python:3.7                                                                   0.6s
 => ERROR [1/5] FROM docker.io/library/python:3.7                                                                                     0.1s
 => => resolve docker.io/library/python:3.7                                                                                           0.1s
 => [internal] load build context                                                                                                     0.0s
------
 > [internal] load metadata for docker.io/library/python:3.7:
------
------
 > [1/5] FROM docker.io/library/python:3.7:
------
failed to solve with frontend dockerfile.v0: failed to build LLB: failed to load cache key: unexpected status code https://dockerhub.azk8s.cn/v2/library/python/manifests/3.7: 403 Forbidden
ERROR: Service 'mlflow' failed to build : Build failed

Looking at the error message I notices that it says

 => ERROR [internal] load metadata for docker.io/library/python:3.7                                                                   0.6s
 => ERROR [1/5] FROM docker.io/library/python:3.7  

So I looked it up and I found this article in which it says that

Docker.Io is the enterprise edition of Docker, and is only available to paying customers

So why is my Docker image using a pay only repository(?)

So far I have used docker multiple time without problem, and I never knew about this "docker.io" what is this exactly?

And why progres could build even though it used also this pay only version?

How can I use the community edition? Or should I? It this the root of the problem?


For reference here is the yaml file

version: '3.7'
services:
  jupyter:
    user: root
    build:
      context: .
      dockerfile: ./docker/jupyter/Dockerfile
      target: ${JUPYTER_TARGET}
      args: 
        - MLFLOW_ARTIFACT_STORE=/${MLFLOW_ARTIFACT_STORE}
        - MLFLOW_VERSION=${MLFLOW_VERSION}
        - JUPYTER_BASE_IMAGE=${JUPYTER_BASE_IMAGE}
        - JUPYTER_BASE_VERSION=${JUPYTER_BASE_VERSION}
        - JUPYTER_USERNAME=${JUPYTER_USERNAME}
    image: ${IMAGE_OWNER}/${REPO_SLUG}/${JUPYTER_TARGET}:${VERSION}
    ports:
      - "${JUPYTER_PORT}:${JUPYTER_PORT}"
    depends_on: 
      - mlflow
    environment: 
      MLFLOW_TRACKING_URI: ${MLFLOW_TRACKING_URI}
      JUPYTER_ENABLE_LAB: ${JUPYTER_ENABLE_LAB}
      NB_USER: ${JUPYTER_USERNAME}
      NB_UID: ${JUPYTER_UID}
      CHOWN_HOME: "yes"
      CHOWN_HOME_OPTS: '-R'
      CHOWN_EXTRA: ${JUPYTER_CHOWN_EXTRA}
      CHOWN_EXTRA_OPTS: '-R'
    volumes:
      - ./:/home/${JUPYTER_USERNAME}/work
      - ./${MLFLOW_ARTIFACT_STORE}:/${MLFLOW_ARTIFACT_STORE}
  mlflow:
    build:
      context: ./docker/mlflow
      args:
        - MLFLOW_VERSION=${MLFLOW_VERSION}
    image: ${IMAGE_OWNER}/${REPO_SLUG}/${MLFLOW_IMAGE_NAME}:${VERSION}
    expose: 
      - "${MLFLOW_TRACKING_SERVER_PORT}"
    ports:
      - "${MLFLOW_TRACKING_SERVER_PORT}:${MLFLOW_TRACKING_SERVER_PORT}"
    depends_on: 
      - postgres
    environment: 
      MLFLOW_TRACKING_SERVER_HOST: ${MLFLOW_TRACKING_SERVER_HOST}
      MLFLOW_TRACKING_SERVER_PORT: ${MLFLOW_TRACKING_SERVER_PORT}
      MLFLOW_ARTIFACT_STORE: ${MLFLOW_ARTIFACT_STORE}
      MLFLOW_BACKEND_STORE: ${MLFLOW_BACKEND_STORE}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DATABASE: ${POSTGRES_DATABASE}
      POSTGRES_PORT: ${POSTGRES_PORT}
      WAIT_FOR_IT_TIMEOUT: ${WAIT_FOR_IT_TIMEOUT}
    volumes:
      - ./${MLFLOW_ARTIFACT_STORE}:/${MLFLOW_ARTIFACT_STORE}
  postgres:
    user: "${POSTGRES_UID}:${POSTGRES_GID}"
    build:
      context: ./docker/postgres
    image: ${IMAGE_OWNER}/${REPO_SLUG}/${POSTGRES_IMAGE_NAME}:${VERSION}
    restart: always
    environment: 
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_USER: ${POSTGRES_USER}
    ports:
      - "${POSTGRES_PORT}:${POSTGRES_PORT}"
    volumes:
      - ./${POSTGRES_STORE}:/var/lib/postgresql/data
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • 1
    The `docker.io/library/...` prefix is normal (also see [How to change the default docker registry from docker.io to my private registry?](https://stackoverflow.com/questions/33054369/how-to-change-the-default-docker-registry-from-docker-io-to-my-private-registry)) but it looks like you're not actually reaching Docker Hub, but rather a `dockerhub.azk8s.cn` site. Do you know what's interfering with your network traffic like this? This doesn't seem like something that can be fixed in code. – David Maze Oct 02 '22 at 11:53
  • That seems to be Azure containers. No idea why it is using that – KansaiRobot Oct 02 '22 at 13:53

0 Answers0