-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] docker build tooling #10
Conversation
8e58d5c
to
a7d7971
Compare
acc | ||
end | ||
|
||
# first line - accomulator empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accomulator -> accumulator
[add] more abstractions to the docker api
[add] support for exec and shell form instructions
[add] support for `COPY`ing files from host machine to container [add] `COPY`ing files doesn't support relative PATH to WORKDIR it has to be and absolute path [fix] take only ImageId parte when committing a container [add] add some logs to commands [add] support 204 and 304 when stopping a container [add] limit kill container after 5 sec waiting for a container [add] remove generated TAR file and return the ContainerId [add] wait :infinity when pulling an image [fix] capture only the matching part of the regexes [add] wait for some instructions to finish [add] support for ENTRYPOINT command
[refactor] DockerApi to be much cleaner
While trying to bind-mount a host directory to a container work I tried to make it work using the official docker client without success, here are the steps i used # https://github.com/docker/docker-py
# python2.7
# https://docker-py.readthedocs.io/en/1.4.0/volumes/
from docker import Client
c = Client(base_url='unix://var/run/docker.sock')
host_config = c.create_host_config(binds=['/Users/kiro/test:/data'])
container_id = c.create_container('busybox:1.29', 'ls /data', volumes=['/data'], host_config=host_config)
c.commit(container_id) Then with the |
it seems we can create a container with the mounted directory but we can't create an image with that mounted directory. moby/moby#6999 NOTE: yes, that seems to be the issue. the steps to reproduce are the same as the steps above but instead of commiting the container and running it, I just ran |
It may be the case that having mounted that directory - and run a command, and generated an image, you will need to mount that directory when you create a container from that image in order to run subsequent commands. If it were a (pseudo) dockerfile/build it would look something like this.
|
[refactor] inject context to every command instead of just the ImageId [refactor] stop container before commiting it
+1 |
[fix] dialyzer errors [change] how regexes capture matches
… BIF [change] handle erl_tar errors
[change] handle API errors [change] use railway oriented flow for creating a layer
[change] fail fast in the presence of errors [change] use rail way oriented flow when uploading dir/files to a container [add] typespecs
extract docker_api project from esl/release_poller#10 into its own project
closing this PR in favor of https://github.com/sescobb27/ex_docker_build |
** Usage