From 7f39388305a01c97fa6f14711d429ce1ef3a658c Mon Sep 17 00:00:00 2001 From: Arthur Amstutz Date: Fri, 19 Sep 2025 06:45:23 +0000 Subject: [PATCH] chore: Add docker image Signed-off-by: Arthur Amstutz --- .cds/workflows/build.yaml | 8 ++++++-- Dockerfile | 13 +++++++++++++ README.md | 12 ++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.cds/workflows/build.yaml b/.cds/workflows/build.yaml index d6ae200..bcaad2e 100644 --- a/.cds/workflows/build.yaml +++ b/.cds/workflows/build.yaml @@ -29,9 +29,15 @@ jobs: if-no-files-found: error push-docker-image: + needs: + - build + - build-wasm runs-on: library/default-vm steps: - uses: actions/checkout + - uses: actions/downloadArtifact + with: + name: ovhcloud - run: docker build -t ovhcloud-cli/ovhcloud . - uses: actions/dockerPush with: @@ -40,8 +46,6 @@ jobs: release: needs: - - build - - build-wasm - push-docker-image if: git.ref_name == 'main' runs-on: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0fd7890 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM alpine:latest + +VOLUME ["/config"] +WORKDIR /config + +RUN apk update && \ + apk add --no-cache tzdata ca-certificates && \ + rm -rf /var/cache/apk/* + +COPY ./ovhcloud /usr/local/bin/ovhcloud + +ENTRYPOINT ["ovhcloud"] +CMD ["--help"] \ No newline at end of file diff --git a/README.md b/README.md index 3d1a847..d1ff9c2 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ # Table of Contents - [Installation](#installation) + - [Binary download](#binary-download) + - [Run with Docker](#run-with-docker) - [Usage](#usage) - [Authenticating the CLI](#authenticating-the-cli) - [Examples](#examples) @@ -23,10 +25,20 @@ # Installation +## Binary download + 1. Download [latest release](https://github.com/ovh/ovhcloud-cli/releases/latest) 2. Untar / unzip the archive 3. Add the containing folder to your `PATH` environment variable +## Run with Docker + +You can also run the CLI using Docker: + +```bash +docker run -it --rm -v ovhcloud-cli-config-files:/config ovhcom/ovhcloud-cli login +``` + # Usage ```bash