dpl
dpl copied to clipboard
Add a docker provider (draft)
Is the image name argument really required?
See https://github.com/travis-ci/dpl/issues/867#issuecomment-524594611.
I've been doing successful deployments just using docker build -t $TAG
and docker push $TAG
.
@mfrancis95 makes sense. i have removed the requirement.
would you be able to test this out? ideally in a real-world deployment usecase?
deploy:
- provider: docker
edge:
branch: sf-docker
@svenfuchs I tested it out. When image
is not included, docker build . --no-cache -t
gets run without a tag, making the deployment fail. I think in this case the target
should be used in its place.
Hello,
I’m new to travis-ci and CI/CD, I’ve tried this patch nevertheless.
I guess your --context
option (defined as the Path or URL to the Dockerfile context
) merges two docker ideas: the context
and the Dockerfile
.
Dockerfile being at the root of the context is only the default behaviour and DPLv2 does not seem to provide any workaround if this is not the case.
Docker provides the possibility to define the Dockerfile we want to use (through the --file/-f
option): this option should be available in DPLv2.
Also, since there are so many options in docker build, providing an “extra” way to define options could be considered.
Another thing that bothers me a little is the image
and target
.
I am no expert of docker but the way it is used in DPLv2 makes me think image
like an intermediate temporary argument. Because only target
will be pushed (and therefore visible).
This needs to be confirmed but only one dest
info could be used alongside the docker build -t ${dest} …
, and no need to docker tag
anymore.
Maybe this is also the reason why @mfrancis95 did try without including image
(I don’t know :)).
Thanks you!
Edit: I guess the docker wording is registry
, repository
, tag
.
Another point, in my logs I could read
docker login --username [secure] --password 9Wp*****************
.
Is legit to exhibit the first 3 characters of the password?
Might need to use the --password-stdin
flag.