Skip to content

Commit d5751ad

Browse files
committed
update readme and compose file for multi platform
1 parent f65140b commit d5751ad

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This repository contains the scripts that build the ContainerSSH container image
1111

1212
This repository contains a build script in Go called `build.go`. It can be invoked by running `go run build.go`. This script will read [build.yaml](build.yaml) and build the container image based on that revision. It uses the GitHub API to download release artifacts, so it may need the `GITHUB_TOKEN` environment variable set. The optional `--push` flag can be set to push the images to the corresponding registries.
1313

14-
Under the hood the build uses [`docker-compose`](https://docs.docker.com/compose/) to build, test, and push the images. The build steps can be performed manually.
14+
Under the hood the build uses [`docker compose`](https://docs.docker.com/compose/) to build, test, and push the images. The build steps can be performed manually.
1515

1616
Before you begin you must set several environment variables. These are the following:
1717

@@ -26,15 +26,15 @@ Before you begin you must set several environment variables. These are the follo
2626
For example, on Linux/MacOS:
2727

2828
```bash
29-
CONTAINERSSH_VERSION="0.3.1"
30-
CONTAINERSSH_TAG="0.3.1"
29+
CONTAINERSSH_VERSION="v0.5.2"
30+
CONTAINERSSH_TAG="v0.5.2"
3131
```
3232

3333
On Windows/PowerShell:
3434

3535
```ps1
36-
$env:CONTAINERSSH_VERSION="0.3.1"
37-
$env:CONTAINERSSH_TAG="0.3.1"
36+
$env:CONTAINERSSH_VERSION="v0.5.2"
37+
$env:CONTAINERSSH_TAG="v0.5.2"
3838
```
3939

4040
### Build
@@ -44,29 +44,29 @@ The build step requires build arguments to function. At the very least it should
4444
Optionally, you can also specify a `GITHUB_TOKEN` to work around GitHub rate limits and `SOURCE_REPO` to point the build to a different source URL.
4545

4646
```bash
47-
docker-compose build
47+
docker compose build
4848
```
4949

5050
### Test
5151

5252
Testing is done via a container called `sut`. This container will wait for ContainerSSH to come up and then run a simple SSH connection to it to test that it works correctly. This is not a comprehensive test, but checks if the image build was successful.
5353

5454
```
55-
docker-compose up --abort-on-container-exit --exit-code-from=sut
55+
docker compose up --abort-on-container-exit --exit-code-from=sut
5656
```
5757

5858
### Clean up after test
5959

6060
```
61-
docker-compose down
61+
docker compose down
6262
```
6363

6464
### Push
6565

66-
Finally, pushing container images can also be done from `docker-compose`. After a `docker login` command this can be simply done using the following command:
66+
Finally, pushing container images can also be done from `docker compose`. After a `docker login` command this can be simply done using the following command:
6767

6868
```
69-
docker-compose push
69+
docker compose push
7070
```
7171

7272
## Versioning

docker-compose.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2-
version: '3.9'
32
services:
43
containerssh:
54
image: ${REGISTRY:-}containerssh/containerssh:${CONTAINERSSH_TAG:?CONTAINERSSH_TAG variable must be set}
65
build:
76
context: containerssh
7+
platforms:
8+
- "linux/amd64"
9+
- "linux/arm64"
810
args:
911
CONTAINERSSH_VERSION: ${CONTAINERSSH_VERSION:?CONTAINERSSH_VERSION variable must be set.}
1012
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
@@ -29,6 +31,9 @@ services:
2931
image: ${REGISTRY:-}containerssh/containerssh-test-authconfig:${CONTAINERSSH_TAG:?CONTAINERSSH_TAG variable must be set}
3032
build:
3133
context: containerssh-test-authconfig
34+
platforms:
35+
- "linux/amd64"
36+
- "linux/arm64"
3237
args:
3338
CONTAINERSSH_VERSION: ${CONTAINERSSH_VERSION:?CONTAINERSSH_VERSION variable must be set.}
3439
GITHUB_TOKEN: ${GITHUB_TOKEN:-}

0 commit comments

Comments
 (0)