heroku-deploy
heroku-deploy copied to clipboard
add targer to docker build
Should be possible to add --target
when we going to do docker build
for example ...
I have an Dockerfile with
FROM image as base
FROM image as dev
Hey @eerison, sorry about asking you regarding this so late. But could elaborate a bit more?
Hi @AkhileshNS
I'm deploying using docker
and it's my Dockerfile
FROM php:7.4-fpm as base
RUN apt-get update
....
FROM base as heroku_web
//build steps ....
FROM base as dev
//dev steps ...
when I run the pipeline to build the image to send to heroku, I would like to use heroku_web
only, But for now there isn't an option to choose the --target
, and it's getting all Dockerfile incluing dev
steps.
Same here, I would like to have the option to specify the --target
argument for the Docker build. This is necessary to take advantage of Docker multi-stage builds. @AkhileshNS to my knowledge this is not possible to do currently, do you know if this is on the roadmap?
Hey @mzanini, Yes it is in the roadmap to add this. I haven't really been able to work on the action for the past nearly 6 months since Covid-19 and having had to make arrangements to move to another country but I do intend to have this feature added by the end of the month. Also I may look into finding people to help maintain the action so sudden stubs of inactivity like this one won't happen again
Thanks @AkhileshNS !
EDIT: I did some more research and it looks like it is not possible to specify a target
as a command-line option to heroku container:push
, which is the tool used by this GitHub action.
As an alternative, one can use heroku.yml
to specify more complex build arguments