Improve Docker build#848
Conversation
|
Yay! Can't wait to play with this tomorrow. Thanks Guillaume. On Fri, Jun 7, 2013 at 1:51 AM, Guillaume J. Charmes <
|
|
This is really minor, but could you please add to that list support for more than one tab stop in a build file? Does build: |
|
How is this supposed to be used with git? I just tried |
|
you can either use |
|
I think we're going to deprecate the 1st version (with git:// scheme). Only the second version (no scheme) will be guaranteed to work. This is the same as golang packages. On Mon, Jun 10, 2013 at 1:38 PM, Guillaume J. Charmes
|
|
Is it also possible to use private repositories with |
|
@shykes, I inspired myself from 'git clone' in order to allow arbitrary git repository. If I remove git://, then we limit git to github. Is that OK? |
|
I see what you mean. I was looking at 'go get' for inspiration. I don't On Tue, Jun 11, 2013 at 11:15 AM, Guillaume J. Charmes <
|
|
@niclashoyer Yes, you can use private repository with |
|
@solomonstre: regexps: http://golang.org/src/cmd/go/vcs.go#L534, VCS lookup: http://golang.org/src/cmd/go/vcs.go#L55. |
|
@creack thanks for the info! The use cas I had in mind was a using specific Dockerfiles customer projects. At the moment I use a public Dockerfile that just sets up a lamp server. Then for each private project I added a Dockerfile to the private repository that installs some packages on top of the lamp server and adds the files related to the project. Is it possible to leave the git:// syntax as a fallback for any git repository and just hand the url over to |
|
I thought a bit about it. I think if we want to support different VCS in the future we've got the the following options: 1. Use RegExp MagicUse the code mentioned by @creack and maybe package it as a go module, so that not every other project out there has to reimplement this magic. 2. Use an URI schema for each VCSThis way we would determine the VCS to use by looking at the prefix of the string given on command line. 3. Use a Command Line SwitchUse a command line switch to determine the VCS and hand the argument over to the VCS command. |
There was a problem hiding this comment.
You also need to change this in commands.go
|
There is an issue, not related to this change, but I think it should be solved by this PR. Let's say there is 4 RUN in your Dockerfile. If your /etc/resolv.conf in your host is empty, the build will fail on step 2, so the 2 first layouts will be created. To solve this you have to manually remove the layers 1 and 2 |
|
@shykes It is already the case. Right now, there is no DNS instruction within the builder, so there is no way to use |
|
First, just to clarify what I mean, try typing this on your machine: docker build -t shykes/inject-dns:result - <<EOF
from shykes/inject-dns
run touch /whatever
cmd echo My dns is: && cat /etc/resolv.conf
EOFThen type this: docker run shykes/inject-dns:resultThis is because there is a "Dns" field in Container.Config. So even if the UI isn't very practical, it's possible for an image to leak its DNS configuration to the host, and it shouldn't be possible. |
|
@shykes if the source image has been configured with custom DNS, this is expected. You want to remove this feature? |
|
Mostly I want to avoid the situation where a build with 'docker -dns FOO' results in an image with {"Dns":["foo"]}, if you know what I mean. |
|
@metalivedev is that better or do you want me to develop a bit more? |
… semver, but our API should still be in 0.X versioning, in which case semver allows breaking changes.
Conflicts: docs/sources/use/builder.rst
Conflicts: api.go builder_client.go commands.go
…uild itself. Yeah baby.
Conflicts: commands.go
Conflicts: buildfile_test.go
|
Boom! You're welcome :) |
|
Ok, so to summarize, in this pull request we have:
|
|
From the documentation I (falsely) inferred that running, Have you considered adding this functionality, or would this break peoples scripts? |
|
/opt and /opt/ will do 2 different things. Did you check that neither does what you want? On Thu, Oct 17, 2013 at 2:10 AM, jottr notifications@github.com wrote:
|
|
Yes, I tried both forms, but neither does the trick. |
Introduced in Docker v0.4.5 / Remove API v1.1 (moby#848), the remote parameter of the API method POST /build allows to specify a buildable remote URL (HTTPS, HTTP or Git). Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
Introduced in Docker v0.4.5 / Remove API v1.1 (moby#848), the remote parameter of the API method POST /build allows to specify a buildable remote URL (HTTPS, HTTP or Git). Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
Introduced in Docker v0.4.5 / Remove API v1.1 (moby#848), the remote parameter of the API method POST /build allows to specify a buildable remote URL (HTTPS, HTTP or Git). Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
Disable DAD for sandbox IPv6 addresses
docker buildwith remote URLdocker buildwith a git/github repository