skip to Main Content

I am trying to build a docker image for my apache-beam Python script that will be deployed on Google DataFlow. The script compiles a template that is placed in a Google Storage bucket. I am working on a windows machine and running everything on Visual Studio Code.

I have written the following in my docker file

FROM python:3.10.9
ADD compile_pipeline_template.py .
ADD first_service_account_key.json .
RUN pip install requests pandas apache-beam apache-beam[gcp]
ENV GOOGLE_APPLICATION_CREDENTIALS="./first_service_account_key.json"
CMD ["python", "./compile_pipeline_template.py"]

The structure of my file is simple

file/
    | -- compile_pipeline_template.py
    | -- first_service_account_key.json
    | -- Dockerfile

I then run docker build -t docker-image . upon which it seems to successfully build the image. The image shows up on the Docker Desktop application but does not show up in the file where I built it. I can run it though using docker run docker-image.

The problem arises when I run docker pull docker-image and it raises Using default tag: latest Error response from daemon: pull access denied for docker-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I am not sure what I am doing wrong. Please help me to identify the issue.

2

Answers


  1. From the official docker page for python (link here), i don’t see the version that you mentioned (3.10.9)

    Suppose if you have 3.10.9 in a different profile or your own docker hub repo, then mention the username along with the image name. Like username/python:tag.

    Login or Signup to reply.
  2. You should try to log out docker logout [options] and then login docker login [options] from the command line to your docker hub account before to pull/push the images.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search