Add docker run options to rocker build
AMWild opened this issue · 2 comments
I've been trying out Rocker in order to build an image that I don't want to docker build
due to the sheer volume of compiler cruft that can be Mounted instead.
However, I've run into two problems:
- I need to
run
the container in--privileged
mode as it is being built. Lack of this results in the build failing - I need to change the port mapping and use
--net=host
in order to allow for the idiosyncracies of the application I'm trying to dockerise - it assumes 'localhost' for many of its dependencies that I don't want to add within the container, and having a different IP address to the host leads to failures, while having the same IP address without having certain IP ports mapped to alternate ports leads to other failures.
Ideally, rocker should expose the docker run
options in the rocker build
options - possibly as a single JSON-encapsulated rocker
option.
I may be able to make this change myself in my own fork - if I can figure out just where to make the change. As near as I can tell, you're using github.com/fsouza/go-dockerclient to interact with Docker, and the options can be passed in through CreateContainer
and the HostConfig
parameter of the CreateContainerOptions struct.
To save me some time, could you tell me just where in all of this code you initialise your own HostConfig for a build and where you read in the build parameters? I should be able to work from there, and if you're interested, I could create a pull request with my changes.
Thanks for requesting. Unfortunately, we are discontinuing this project. See the notice here: https://github.com/grammarly/rocker/blob/master/README.md
Closing this issue as we are not able to implement it. Sorry.