Replies: 5 comments 13 replies
-
|
I am confused how this feature was not implemented on release. |
Beta Was this translation helpful? Give feedback.
-
|
linking back to the open PR for this feature in case it bumps it up the queue implementing it is fairly simple (there's already an EntryPointArgs in the DockerCreate wrapper, it's just not populated from yaml) |
Beta Was this translation helpful? Give feedback.
-
|
The fact that customizing the |
Beta Was this translation helpful? Give feedback.
-
|
Hi everyone 👋 Thank you for all the feedback here and across the related threads. Building custom wrapper images just to pass flags to a database or start a service shouldn't be necessary. We've been working on a solution and would love your input. The problemService containers have no way to pass arguments to the image entrypoint. The Every key in the YAML maps to Docker options before the image name. Nothing maps to services:
<service_id>:
image: string
env: { key: value }
ports: [ string ]
volumes: [ string ]
options: string # Maps to [OPTIONS]
# Nothing maps to [COMMAND] [ARG...]This forces workarounds for common scenarios like passing What we're proposingWe're adding two new keys to service containers: Passing flags with services:
mysql:
image: mysql:8
command: --sql_mode=STRICT_TRANS_TABLES --max_allowed_packet=512M
env:
MYSQL_ROOT_PASSWORD: test
ports:
- 3306:3306Resulting Overriding services:
etcd:
image: microbox/etcd:2.1.1
entrypoint: etcd
command: >-
--listen-client-urls http://0.0.0.0:2379
--advertise-client-urls http://0.0.0.0:2379
ports:
- 2379:2379Resulting The names and behavior match Docker Compose, so if you've written a Key points:
Does this address your needs?We think this covers the core scenarios (database flags, service configuration, custom entrypoints) but want to make sure we're not missing anything. Does this solve your use case, or is there a scenario where you'd still need a wrapper image? Thanks again for all the feedback and patience. We're looking forward to hearing your thoughts! — The GitHub Actions Team |
Beta Was this translation helpful? Give feedback.
-
|
While it's not available, I found a good old "mysql escape" solution. This is the service start command: /usr/bin/docker create \
--name ... \
--label ... \
--network ... \
--network-alias ... \
$OPTIONS \
-e GITHUB_ACTIONS=true -e CI=true ...And this is the options value: services:
<imagename>:
image: <imageurl>
options: >-
-e GITHUB_ACTIONS=true -e CI=true <imageurl>
<imagename> --param1 --param2 --param3 #This way when the options string is injected into the command, we can change the order of arguments with it and then comment out every remaining arguments. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I haven't found any suitable solution for passing arguments to service container.
For example I would like to use
trufflesuite/ganache:latestimage as job's service container with--wallet.deterministicoption.Unfortunately there is no such thing as
jobs.<job_id>.services.<service_id>.commandoption to achieve that:In
docker-compose.ymlfile I can usecommandto pass arguments:Are you planning to add this feature?
Beta Was this translation helpful? Give feedback.
All reactions