Search code examples
dockeramazon-ecsexifexiftool

Running Exiftool in Alpine Docker


I have been struggling with the installation of Exiftool for my AWS ECS Container. I'm using python:3.7-alpine3.13 as my base image and successfully added exiftool and perl-image-exiftool by adding RUN apk add exiftool perl-image-exiftool to my Dockerfile.

On my Mac all I had to do was brew install exiftool to get it to work.

Although the code works in my local developement and the build process works for my container I still get the error FileNotFoundError: [Errno 2] No such file or directory: 'exiftool': 'exiftool'

Is there anything that I'm missing?


Solution

  • No idea why it worked or made a difference, but moving where the installation of the library was happening fixed the issue

    Original

    RUN apk add --update --no-cache --virtual .tmp-build-deps \
        gcc libc-dev linux-headers postgresql-dev musl-dev zlib zlib-dev \
        libressl-dev libffi-dev exiftool
    

    Fixed

    RUN apk add --update --no-cache --virtual .tmp-build-deps \
        gcc libc-dev linux-headers postgresql-dev musl-dev zlib zlib-dev \
        libressl-dev libffi-dev
    RUN apk add exiftool
    

    If anybody know why that would make a difference I would be happy to learn about it!