Skip to content

Commit 7f39388

Browse files
committed
chore: Add docker image
Signed-off-by: Arthur Amstutz <arthur.amstutz@corp.ovh.com>
1 parent cf098f0 commit 7f39388

3 files changed

Lines changed: 31 additions & 2 deletions

File tree

.cds/workflows/build.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ jobs:
2929
if-no-files-found: error
3030

3131
push-docker-image:
32+
needs:
33+
- build
34+
- build-wasm
3235
runs-on: library/default-vm
3336
steps:
3437
- uses: actions/checkout
38+
- uses: actions/downloadArtifact
39+
with:
40+
name: ovhcloud
3541
- run: docker build -t ovhcloud-cli/ovhcloud .
3642
- uses: actions/dockerPush
3743
with:
@@ -40,8 +46,6 @@ jobs:
4046

4147
release:
4248
needs:
43-
- build
44-
- build-wasm
4549
- push-docker-image
4650
if: git.ref_name == 'main'
4751
runs-on:

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM alpine:latest
2+
3+
VOLUME ["/config"]
4+
WORKDIR /config
5+
6+
RUN apk update && \
7+
apk add --no-cache tzdata ca-certificates && \
8+
rm -rf /var/cache/apk/*
9+
10+
COPY ./ovhcloud /usr/local/bin/ovhcloud
11+
12+
ENTRYPOINT ["ovhcloud"]
13+
CMD ["--help"]

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# Table of Contents
1212

1313
- [Installation](#installation)
14+
- [Binary download](#binary-download)
15+
- [Run with Docker](#run-with-docker)
1416
- [Usage](#usage)
1517
- [Authenticating the CLI](#authenticating-the-cli)
1618
- [Examples](#examples)
@@ -23,10 +25,20 @@
2325

2426
# Installation
2527

28+
## Binary download
29+
2630
1. Download [latest release](https://github.com/ovh/ovhcloud-cli/releases/latest)
2731
2. Untar / unzip the archive
2832
3. Add the containing folder to your `PATH` environment variable
2933

34+
## Run with Docker
35+
36+
You can also run the CLI using Docker:
37+
38+
```bash
39+
docker run -it --rm -v ovhcloud-cli-config-files:/config ovhcom/ovhcloud-cli login
40+
```
41+
3042
# Usage
3143

3244
```bash

0 commit comments

Comments
 (0)