Skip to main content

Sauce Connect Proxy 5 Docker Container

Sauce Connect Proxy release includes Docker image to support a containerized CI/CD environment, see Sauce Connect Docker container for more information.

Here are some benefits/use cases for using containerized Sauce Connect Proxy:

  • You want to run Sauce Connect Proxy as part of a containerized CI/CD.
  • You want to utilize a rich ecosystem of tools and services that container orchestration tools, such as Kubernetes, provide.

What You’ll Need

Running the Sauce Connect Docker Container

  1. Pull the Sauce Connect Proxy Docker Image from the Docker Hub.

    • To pull the latest version of Sauce Connect Proxy (recommended):
    $ docker pull saucelabs/sauce-connect:5.0
    • To use a specific version, add it as a tag:
    $ docker pull saucelabs/sauce-connect:5.0.1-amd64
    Supported tags
    - 5, 5.0, 5.0.1, 5.0.1-amd64, 5.0.1-arm64v8
  2. To run the Sauce Connect Proxy Docker image, modify and run the script below.

    $ SAUCE_USERNAME="my-user" SAUCE_ACCESS_KEY="my-access-key" SAUCE_REGION="<us-west|eu-central>" SAUCE_TUNNEL_NAME="my-tunnel-name" \
    docker run \
    -e SAUCE_USERNAME=${SAUCE_USERNAME} \
    -e SAUCE_ACCESS_KEY=${SAUCE_ACCESS_KEY} \
    -e SAUCE_REGION=${SAUCE_REGION} \
    -e SAUCE_TUNNEL_NAME=${SAUCE_TUNNEL_NAME} \
    --network="host" \
    -it saucelabs/sauce-connect:5.0

    If desired, you can specify any additional sc run options as environment variables.

    Alternatively, you can also mount a config file to the container by adding the -v option to the docker run command.

    $ docker run \
    -v /path/to/config.yaml:/etc/sauce-connect/sauce-connect.yaml \
    --network="host"\
    -it saucelabs/sauce-connect:5.0

See Sauce Connect Proxy Readiness Checks for more information on how to check if the tunnel is ready to accept jobs.

note

The example above uses --network="host" docker option to allow Sauce Connect in the Docker container to access your local services in the host machine. This option does not work on MacOS and Windows. See Connect from a container to a service on the macOS host for more details.

Additional Resources