Virtual-environments: Is there an easy way to let Azure Resource Manager Templates build a docker image?

Created on 20 Dec 2019  路  9Comments  路  Source: actions/virtual-environments

I do not know the azure ecosystem. Is there an option in azure to build a docker image based on this file: https://github.com/actions/virtual-environments/blob/master/images/linux/ubuntu1804.json

I could try to execute or convert all shell commands to a Dockerfile but i would prefer an automated approach, to easily catch-up this this repo, if it changes. Is azure able to output docker images from this template? Is there a converter to Dockerfile available? Other ideas?

PS: I want to run some stuff in a local build environment, before pushing it to github (to let github build my official release).

question

Most helpful comment

I was able to modify the packer definition to build a docker image for my use cases. I ended up removing a lot of packages that I did not need to reduce the image size, the build time, and to avoid issues caused by differences between the Azure and Docker base images. The excluded packages may have issues when building in docker that I did not encounter. This could be the starting point for more generalized docker support: https://github.com/actions/virtual-environments/compare/master...jpb:docker.

All 9 comments

Hi @daniela-waranie, it might be possible but I'm not sure how straightforward it would be. I think @StanleyGoldman tried it once and went through some pain (please correct me if I'm wrong), maybe he can share his experience.

I am also interested in a docker image.

This issue has not had any activity for 45 days and will be closed in 45 days if there continues to be no activity.

@StanleyGoldman, please share your experience with us.

I was able to modify the packer definition to build a docker image for my use cases. I ended up removing a lot of packages that I did not need to reduce the image size, the build time, and to avoid issues caused by differences between the Azure and Docker base images. The excluded packages may have issues when building in docker that I did not encounter. This could be the starting point for more generalized docker support: https://github.com/actions/virtual-environments/compare/master...jpb:docker.

@daniela-waranie I'll close this since there's no supported way to do this right now. I think it's fine to keep the discussion going here as a closed issue or we can move it to the community forums: https://github.community/t5/GitHub-Actions/bd-p/actions.

This ticket started out as a support request, but more and more thinking about it i would now like to treat it as a feature request: "build azure base images and docker images with the same provisioning tool" / "add docker image as a supported option to run github actions locally"

would be cool it you can reopen this ticket

Hi, @daniela-waranie. At this time this is not a feature we plan to support.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

estebanes22 picture estebanes22  路  3Comments

raulpopadineti picture raulpopadineti  路  3Comments

Poolitzer picture Poolitzer  路  4Comments

jayaddison picture jayaddison  路  3Comments

shivammathur picture shivammathur  路  3Comments