Thread
#prefect-community
    Joseph Haaga

    Joseph Haaga

    1 year ago
    I’m working on a Python utility to automate the registration/deployment of Flows for our Prefect users; I noticed that the Dockerfile generated by
    DockerStorage.create_dockerfile_object(directory)
    contains a COPY statement to add
    healthcheck.py
    to the image, but uses an absolute path (which
    docker build
    treats as a relative path from the build context)
    COPY /absolute/path/on/my/machine/healthcheck.py /opt/prefect/healthcheck.py
    This causes the following error:
    Step 6/16 : COPY /absolute/path/on/my/machine/healthcheck.py /opt/prefect/healthcheck.py
    COPY failed: stat /var/lib/docker/tmp/docker-builder852791584/absolute/path/on/my/machine/healthcheck.py: no such file or directory
    However, this works fine when I manually update the Dockerfile to use a relative path to
    healthcheck.py
    Would this constitute an issue? Or am I circumventing an intentional design decision?
    Dylan

    Dylan

    1 year ago
    Hi @Joseph Haaga! I’m not sure if this is intentional or an issue. If you’re unsure, I might suggest opening a github discussion and then you can transition to an issue if necessary