Pass environment variables and commands for services

When using services in the Docker runner I’d like to inject environment variables and override command and entrypoint arguments. This is for example required when running a service like Postgres which requires POSTGRES_PASSWORD to be set.


This environment variable is required for you to use the PostgreSQL image. It must not be empty or undefined. This environment variable sets the superuser password for PostgreSQL. The default superuser is defined by the POSTGRES_USER environment variable.

I’ve found that services might have the same definition as steps in the source code. I’ll try to pass the same parameters.

here is an example postgres configuration in the docs that you may find helpful

Nice, thanks!

It would be useful to include an example on the services landing page that demonstrates how to override environment variables and commands.

On a side note: does a service inherit the root environment configuration? Is it shared between all services? e.g is it possible to:

kind: pipeline
type: docker
name: default


  - name: postgres
    image: postgres:11

This is useful if both the app and the postgres container share the POSTGRES_PASSWORD variable.