Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation.md with docker run for both score-compose and score-k8s #139

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions content/en/docs/score implementation/score-compose/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,22 @@ go install -v github.com/score-spec/score-compose/cmd/score-compose@latest

Prerequisites: You must have [Docker](https://docs.docker.com/get-docker/) installed.

1. Download the repository.
The following example uses the GitHub CLI to download the project.

```bash
gh repo clone score-spec/score-compose
```

2. Change directories into `score-compose`.

```bash
cd score-compose
```

3. Build the Docker image by running the following command in the same directory as the Dockerfile.

```bash
docker build -t score-compose:latest .
docker run --rm -it ghcr.io/score-spec/score-compose:latest
```

4. Run the Docker image by using the `docker run` command.
If you want to run `score-compose` with the `--help` flag to view the available options, you would run the following command.

```bash
docker run -it score-compose:latest
docker run --rm -it ghcr.io/score-spec/score-compose:latest --help
```

If you want to run `score-compose` with the `--help` flag to view the available options, you would run the following command.
If you want to run `score-compose` with the `init` subcommand to initialize your local working directory, you would run the following command.

```bash
docker run -it score-compose:latest --help
docker run --rm -it -v .:/score-compose ghcr.io/score-spec/score-compose:latest init
```

This will start a new container based on the image you built, run `score-compose` with the `--help` flag, and then stop the container.

## Manual download

The following methods download the `score-compose` CLI from its [GitHub release page](https://github.com/score-spec/score-compose/releases):
Expand Down
21 changes: 21 additions & 0 deletions content/en/docs/score implementation/score-k8s/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ You can install the `score-k8s` CLI in a variety of ways:

- [Homebrew](#homebrew)
- [Go](#go)
- [Docker](#docker)
- [Manual download](#manual-download)

### Homebrew
Expand All @@ -29,6 +30,26 @@ Prerequisites: You must have [Go](https://go.dev/dl/) installed.
$ go install -v github.com/score-spec/score-k8s@latest
```

## Docker

Prerequisites: You must have [Docker](https://docs.docker.com/get-docker/) installed.

```bash
docker run --rm -it ghcr.io/score-spec/score-k8s:latest
```

If you want to run `score-k8s` with the `--help` flag to view the available options, you would run the following command.

```bash
docker run --rm -it ghcr.io/score-spec/score-k8s:latest --help
```

If you want to run `score-k8s` with the `init` subcommand to initialize your local working directory, you would run the following command.

```bash
docker run --rm -it -v .:/score-k8s ghcr.io/score-spec/score-k8s:latest init
```

### Manual download

The following methods download the `score-k8s` CLI from its [GitHub release page](https://github.com/score-spec/score-k8s/releases):
Expand Down