-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add an ability to specify entrypoint for dockerimage tool in Devfile #12668
Comments
@l0rd Do you think the proposed format is good, or it would be better to have something like current devfile draft has |
@sleshchenko command and args is perfect. |
Here is a technical issue in implementing it. We convert dockerimage tool to an environment with dockerimage recipe. For example: - name: che-dev
type: dockerimage
image: eclipse/che-dev:nightly
env:
- name: CHE_LOGS_DIR
value: /home/user/che-logs
endpoints:
- name: tomcat
port: 8080
attributes:
public: 'true'
volumes:
- name: maven
containerPath: /home/user/.m2
memoryLimit: 1.5G
mountSources: true Will be converted to {
"che-dev": {
"machines": {
"che-dev": {
"attributes": {
"memoryLimitBytes": "1500000000"
},
"servers": {
"tomcat": {
"attributes": {
"public": "true"
},
"port": "8080",
"protocol": "http"
}
},
"volumes": {
"projects": {
"path": "/projects"
},
"maven": {
"path": "/home/user/.m2"
}
},
"installers": [],
"env": {
"CHE_LOGS_DIR": "/home/user/che-logs"
}
}
},
"recipe": {
"type": "dockerimage",
"content": "eclipse/che-dev:nightly"
}
}
} And the issue that currently there is no an ability to specify entrypoint for {
"che-dev": {
"machines": {
"che-dev": {
"attributes": {
"memoryLimitBytes": "1500000000",
"command": "['/bin/sh', '-c']",
"args": "['tail -f /dev/null']"
},
...
}
},
"recipe": {
"type": "dockerimage",
"content": "eclipse/che-dev:nightly"
}
}
} Attributes names can be more self-explaining, like |
👍 to use attributes until we remove workspace config and start using devfile directly. |
👍 for |
ok for me. |
The fool of me forgot about the second PR :) |
Both PRs are merged, so I'm closing this issue. Yay! |
@metlos 🎉 🎉 🎉 |
Description
There are cases when a user wants to use some official docker image in
dockerimage
tool but default entrypoint is not suitable for his needs. In this case, it is needed to have an ability to specify entrypoint and arguments fordockerimage
tool in Devfile.The proposal is to add two optional fields
command
andarguments
which type isstring array
. It's the same as Kubernetes Container model has https://docs.openshift.com/container-platform/3.5/rest_api/kubernetes_v1.html#v1-container.It would look like the following
The text was updated successfully, but these errors were encountered: