@@ -67,6 +67,45 @@ Installation
6767 $ chmod +x scim2
6868 $ ./scim2 --help
6969
70+ .. tab-item :: :iconify:`devicon:docker` Container
71+ :sync: container
72+
73+ Each release publishes an image on the `GitHub container registry <https://github.com/python-scim/scim2-cli/pkgs/container/scim2-cli >`_.
74+ The arguments are passed to ``scim2 ``:
75+
76+ .. code-block :: console
77+
78+ $ docker run --rm ghcr.io/python-scim/scim2-cli --help
79+
80+ Pass the server URL and the headers with environment variables.
81+ Pass ``--interactive `` to send JSON on stdin:
82+
83+ .. code-block :: console
84+
85+ $ echo '{"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "userName": "bjensen"}' | \
86+ docker run --rm --interactive \
87+ --env SCIM_CLI_URL=https://auth.example/scim/v2 \
88+ --env SCIM_CLI_HEADERS="Authorization: Bearer 12345" \
89+ ghcr.io/python-scim/scim2-cli create
90+
91+ The working directory in the container is ``/work ``.
92+ Mount the current directory there to read files with relative paths:
93+
94+ .. code-block :: console
95+
96+ $ docker run --rm --user "$(id -u):$(id -g)" --volume "$PWD:/work" \
97+ --env SCIM_CLI_URL=https://auth.example/scim/v2 \
98+ ghcr.io/python-scim/scim2-cli --schemas schemas.json search user
99+
100+ To check the compliance of a server in a CI pipeline, run the :ref: `reference:test ` command:
101+
102+ .. code-block :: console
103+
104+ $ docker run --rm --env SCIM_CLI_URL=https://auth.example/scim/v2 ghcr.io/python-scim/scim2-cli test
105+
106+ A server running on the host is not reachable at ``localhost `` from the container.
107+ Pass ``--network host ``, or run both containers on the same network.
108+
70109 .. tab-item :: :iconify:`devicon:git` Sources
71110 :sync: sources
72111
@@ -93,3 +132,10 @@ Installation
93132 $ uv sync --group bundle
94133 $ uv run pyinstaller scim2.spec
95134 $ ./dist/scim2 --help
135+
136+ Or build the container image:
137+
138+ .. code-block :: console
139+
140+ $ docker build --file Containerfile --tag scim2-cli .
141+ $ docker run --rm scim2-cli --help
0 commit comments