RUN curl -fsSL “https://github.com/docker/compose/releases/download/v2.36.2/docker-compose-linux-$(uname -m)“ -o /usr/local/lib/docker/cli-plugins/docker-compose && chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
curl: (23) Failure writing output to destination
ERROR: process “/bin/sh -c curl -fsSL \“https://github.com/docker/compose/releases/download/v2.36.2/docker-compose-linux-$(uname -m)\” -o /usr/local/lib/docker/cli-plugins/docker-compose && chmod +x /usr/local/lib/docker/cli-plugins/docker-compose” did not complete successfully: exit code: 23
Hi! Your guess is right. curl exit code 23 means it couldn’t write the file, and /usr/local/lib/docker/cli-plugins/ usually isn’t present until Docker is installed.
Create the directory first:
RUN mkdir -p /usr/local/lib/docker/cli-plugins \
&& curl -fsSL "https://github.com/docker/compose/releases/download/v2.36.2/docker-compose-linux-$(uname -m)" \
-o /usr/local/lib/docker/cli-plugins/docker-compose \
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
If you need a full Docker + Compose setup in the agent, the supported path is in Running Docker (install Docker CE / Compose via apt, then start the daemon with sudo service docker start in your environment start command).