I am new in Docker so please do not blame me :)
Is there a way to create two different Dockerfiles inherits from one? Example, we have to have 2 environment: develop and production. Theirs base is the same:
FROM gcc
# it's just an example which shows the same base packets for both environment
RUN apt install lib-boost
For "develop" I have to install some utilities like gdb, valgrind etc. For "production" I have to build an application. It thought to use "multi stage builds", but it runs steps in Dockerfile consistently. How I should do if I do not want to build an application in "develop"?
The first build the base image:
build -t base_image .
And then for each Dockerfile use it?
# for develop
FROM base_image
RUN apt install gdb
# for prod
FROM base_image
RUN make