I'm trying to add the plpython package to my docker container (running an Ubunutu image) using the following command (RUN being the docker command that you can ignore if you don't know Docker):
RUN apt-get install -y postgresql-plpython-$PG_MAJOR=$PG_VERSION
However this gives the following error:
E: Unable to locate package postgresql-plpython-9.4
E: Couldn't find any package by regex 'postgresql-plpython-9.4'
INFO[0005] The command [/bin/sh -c apt-get install -y postgresql-plpython-$PG_MA
JOR=$PG_VERSION] returned a non-zero code: 100
However if I insert this same command into this part of an existing Dockerfile (i.e. I add the line postgresql-plpython-$PG_MAJOR=$PG_VERSION \
, the command works.
I don't know much about apt-get, so can someone explain why the package is found in the context of the parent Dockerfile, but not my Dockerfile? What can I do to get the package to be found?