From the following image: https://registry.hub.docker.com/u/cloudesire/activemq/dockerfile/
If I wanted to override the ACTIVEMQ_VERSION environment variable in my child docker file, I assumed I would be able to do something like the following:
FROM cloudesire/activemq:latest
MAINTAINER abc <abc@xyz.co.uk>
ENV ACTIVEMQ_VERSION 5.9.1
ADD ./src/main/resources/* /opt/activemq/conf/
However this does not seem to work. Admittedly I am new to Docker and have obviously misunderstood something. Please could someone explain why this does not work, and how/if I can achieve it another way?
That won't work. The
ACTIVEMQ_VERSION
has already been used by thecloudesire/activemq:latest
image build to populate its image layers. All the ActiveMQ installation files based on version5.11.1
are already extracted in their corresponding directories.In your
Dockerfile
you only can build on top of what has already been build there and add your files. Your ownDockerfile
build will not re-run the build instructions described in theirDockerfile
.If you need to have your own
cloudesire/activemq
image based on version 5.9.1 you need to clone theirDockerfile
, adjust the version there and build it locally. So you could base your otherDockerfile
on it.