-
Notifications
You must be signed in to change notification settings - Fork 96
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
DockerImage build step #555
Comments
Sounds good if you can make fetching the image from the repository. Having local docker daemon for this task is a bit ugly. I wanted to do that at some point but don't remember why I didn't. |
Of course I don't use docker for that. There is docker registry client. The only thing it should be patched to support streamed downloading of layers: anti-social/dkregistry-rs@02f1075 (please review when have time). |
Looks fine. There is also https://crates.io/crates/oci-registry-client which has streaming API (as far as I can see in front page example). Although, it is newer and has little downloads. I would also prefer streaming API like in |
Looked at https://crates.io/crates/oci-registry-client - it is not able to fetch oauth url from the registry. You should pass the url when creating a client. |
Should we detect OS after unpacking a docker image so we could use distro specific steps? - !DockerImage ubuntu:focal
- !Install [bc] |
Sounds useful, but we have to have some control over that. Just brainstorming here: - !DockerImage ubuntu:focal
- !Assume ubuntu
- !Install [bc] Or: - !DockerImage ubuntu:focal
- !Assume
- !Ubuntu focal
- !Install [bc] Or: setup:
- !DockerImage ubuntu:focal
- !Install [bc]
assumptions:
distro: ubuntu Maybe we can generalize to other assumptions here. I.e. instead of: - !PipConfig
install-python: false Have something like this: assumptions:
python-installed: true So after using docker image, you can mark all things (yes, yet another syntax proposal): - !DockerImage python-3.6
- !Assume
distro: ubuntu # this also reads /etc/os-release for version automatically
python-exe: /usr/bin/python3.6 As part of this proposal, by default we should read - !DockerImage
version: ubuntu
auto-detect: false Or: auto-detect-distro: false
setup:
- !DockerImage ubuntu Or: - !DockerImage ubuntu
- !Assume no-distribution Or: - !DisableAutoDetect
- !DockerImage ubuntu What do you think? |
I also thought about a specific build step to detect a container distro. And yes, it will be better to make it explicit. I think we don't have to explicitly specify a distro like: - !Assume ubuntu as we could read distro directly from the Should we only try to detect distro after the first build step in the following 2 examples? setup:
- !DockerImage ubuntu:focal
- !Install [bc]
assumptions:
distro: ubuntu auto-detect-distro: false
setup:
- !DockerImage ubuntu |
At the moment, I'm thinking that we may do: - !Assume
distro: ubuntu <-- only overrides this option You can reset assumptions via: - !Assume
reset: true <-- or maybe a `clean: true`
distro: ubuntu Or like this: - !AssumeNothing # or AssumeReset or ForgetAssumptions or AssumeClean?
- !Assume
distro: ubuntu # << this adds ubuntu to clear set of assuptions The core here:
- !DockerImage ubuntu
- !Assume # auto-determine distro
- !Sh 'apt-get install python3.7'
- !Assume python3: /usr/bin/python3.7 Maybe stucture it like this?
And also Still don't like |
I think |
Another question: would it be useful to store docker image containers:
elasticsearch:
setup:
- !DockerImage elasticsearch:7.17.0
commands:
elasticsearch: !Command
container: elasticsearch In other case we need to find out manually how to run such a container. |
In which sense does it mangle? It does not do any sort of thing, until you do any command like This approach makes sense, though, if we expect that common case would be to just use docker image verbatim without any additional commands.
It makes sense to save it in some way, but I don't think that introducing commands that don't have
Too many questions at this point :( Also a lot of the same comes to volumes I think, no? |
init_ubuntu_core is called before any |
+1 Either it can be another kind of a command: commands:
elasticsearch: !DockerEntrypoint
container: elasticsearch |
Sure. We definitely should not do any of these.
This is a bit weird, but would probably be the most straightforwards currently. |
Have a PoC of the
!DockerImage
build step:What do you think about it?
TODO:
registry
,image
,tag
,path
!DockerImage python
,!DockerImage python:3.10-slim
Superseeds #502
The text was updated successfully, but these errors were encountered: