Skip to content

Commit 120a4e2

Browse files
Fix outdated Docker instructions (#559)
1 parent a0a9670 commit 120a4e2

File tree

3 files changed

+109
-16
lines changed

3 files changed

+109
-16
lines changed

building/tooling/analyzers/docker.md

+37-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,43 @@
22

33
Our Analyzers are deployed as Docker images.
44

5-
Please read the [general tooling Docker information](/docs/building/tooling/docker) to familiarize yourself with how these work.
5+
Please read the [general Tooling docker information](/docs/building/tooling/docker) to familiarize yourself with how these work.
66

7-
When we run the Analyzer's container we execute a `run.sh` script.
8-
To ensure this works properly the following rules must be following:
7+
## Integration
98

9+
When we run an Analyzer to analyze a solution, we run a Docker command that looks like this:
10+
11+
```shell
12+
docker run \
13+
--rm \
14+
--network none \
15+
--mount type=bind,src="${solution_dir}",dst=/solution \
16+
--mount type=bind,src="${output_dir}",dst=/output \
17+
--tmpfs /tmp:rw \
18+
"exercism/${track_slug}-analyzer" \
19+
"${exercise_slug}" "/solution" "/output"
20+
```
21+
22+
You can see that we pass three arguments to the Docker image:
23+
24+
1. The exercise slug
25+
2. The path to the solution's directory
26+
3. The path to the output directory
27+
28+
## Conventions
29+
30+
All our Analyzers use the following conventions in their implementation:
31+
32+
- The `Dockerfile` is in the repo's root directory.
1033
- The working directory should be `/opt/analyzer`.
11-
- There should be a `/opt/analyzer/bin/run.sh` script that can be called with 3 parameters:
12-
the `exercise slug`, the path to the `solution folder`, and the path to the `output folder`.
13-
For more information see [The Interface](/docs/building/tooling/analyzers/interface).
34+
- The entrypoint is `/opt/analyzer/bin/run.sh`
35+
- The `/opt/analyzer/bin/run.sh` script takes 3 arguments:
36+
1. The exercise slug
37+
2. The path to the solution's directory
38+
3. The path to the output directory
39+
40+
For more information see [The Interface](/docs/building/tooling/analyzer/interface).
41+
42+
```exercism/note
43+
New analyzer repos will use these conventions by default.
44+
```

building/tooling/representers/docker.md

+36-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,41 @@ Our Representers are deployed as Docker images.
44

55
Please read the [general Tooling docker information](/docs/building/tooling/docker) to familiarize yourself with how these work.
66

7-
When we run the Representer's container we execute a `run.sh` script.
8-
To ensure this works properly the following rules must be following:
7+
## Integration
98

9+
When we run a Representer to create a solution representation, we run a Docker command that looks like this:
10+
11+
```shell
12+
docker run \
13+
--rm \
14+
--network none \
15+
--mount type=bind,src="${solution_dir}",dst=/solution \
16+
--mount type=bind,src="${output_dir}",dst=/output \
17+
--tmpfs /tmp:rw \
18+
"exercism/${track_slug}-representer" \
19+
"${exercise_slug}" "/solution" "/output"
20+
```
21+
22+
You can see that we pass three arguments to the Docker image:
23+
24+
1. The exercise slug
25+
2. The path to the solution's directory
26+
3. The path to the output directory
27+
28+
## Conventions
29+
30+
All our Representers use the following conventions in their implementation:
31+
32+
- The `Dockerfile` is in the repo's root directory.
1033
- The working directory should be `/opt/representer`.
11-
- There should be a `/opt/representer/bin/run.sh` script that can be called with 3 parameters:
12-
the `exercise slug`, the path to the `solution folder`, and the path to the `output folder`.
13-
For more information see [The Interface](/docs/building/tooling/representers/interface).
34+
- The entrypoint is `/opt/representer/bin/run.sh`
35+
- The `/opt/representer/bin/run.sh` script takes 3 arguments:
36+
1. The exercise slug
37+
2. The path to the solution's directory
38+
3. The path to the output directory
39+
40+
For more information see [The Interface](/docs/building/tooling/test-runners/interface).
41+
42+
```exercism/note
43+
New representer repos will use these conventions by default.
44+
```

building/tooling/test-runners/docker.md

+36-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,41 @@ Our Test Runners are deployed as Docker images.
44

55
Please read the [general Tooling docker information](/docs/building/tooling/docker) to familiarize yourself with how these work.
66

7-
When we run the Test Runner's container we execute a `run.sh` script.
8-
To ensure this works properly the following rules must be following:
7+
## Integration
98

9+
When we run a Test Runner to test a solution, we run a Docker command that looks like this:
10+
11+
```shell
12+
docker run \
13+
--rm \
14+
--network none \
15+
--mount type=bind,src="${solution_dir}",dst=/solution \
16+
--mount type=bind,src="${output_dir}",dst=/output \
17+
--tmpfs /tmp:rw \
18+
"exercism/${track_slug}-test-runner" \
19+
"${exercise_slug}" "/solution" "/output"
20+
```
21+
22+
You can see that we pass three arguments to the Docker image:
23+
24+
1. The exercise slug
25+
2. The path to the solution's directory
26+
3. The path to the output directory
27+
28+
## Conventions
29+
30+
All our test runners use the following conventions in their implementation:
31+
32+
- The `Dockerfile` is in the repo's root directory.
1033
- The working directory should be `/opt/test-runner`.
11-
- There should be a `/opt/test-runner/bin/run.sh` script that can be called with 3 parameters:
12-
the `exercise slug`, the path to the `solution folder`, and the path to the `output folder`.
13-
For more information see [The Interface](/docs/building/tooling/test-runners/interface).
34+
- The entrypoint is `/opt/test-runner/bin/run.sh`
35+
- The `/opt/test-runner/bin/run.sh` script takes 3 arguments:
36+
1. The exercise slug
37+
2. The path to the solution's directory
38+
3. The path to the output directory
39+
40+
For more information see [The Interface](/docs/building/tooling/test-runners/interface).
41+
42+
```exercism/note
43+
New test runner repos will use these conventions by default.
44+
```

0 commit comments

Comments
 (0)