I am trying to set up a bitbucket pipeline that uses a database service provided by a container. However, in order to get the database service started correctly, I need to pass an argument to be received by the database container's ENTRYPOINT. I see from the pipeline service doc that it's possible to send `variables` to the service's docker container, but the option I need to set isn't settable by an environment variable, only by a command line argument.
When I run the database's docker image locally using `docker run`, I am able to set the option just by adding it to the end of the `docker run` command, and it gets correctly applied to the container's ENTRYPOINT, so it seems like it should be straightforward, I just can't figure out where to put the argument in bitbucket-pipelines.yml.
So, for example, here's a sample `definitions` section showing what I'm looking for:
definitions:
services:
myFavoriteDatabase:
image: myFavoriteDatabase
something-here-to-pass-an-argument-to-myFavoriteDatabase-please: "-myOption 10"
Hi @mac_nsr
Welcome to the community.
Unfortunately, it's not possible to pass extra arguments or commands while running a service container on Pipelines.
As a workaround, you have 2 options for this:
Hope it helps and let me know if you have further questions that I can help with.
Regards,
Mark C
Thanks @Mark C, I imagine I can make one of those workarounds work. In the meantime, is there a way to turn this into a feature request? I imagine I'm not the only one who would find it convenient to be able to pass arguments to a service container, and it seems pretty similar to the `variables` feature that's already available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mac_nsr,
I went ahead and created a feature request for you that can be located through this link. - https://jira.atlassian.com/browse/BCLOUD-21810
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.
Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy here.
Hope it helps and let me know if you have further questions.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.