Skip to content

Commit 8f02d93

Browse files
committed
Load default config and expose config and work directories in docker image
1 parent 50d3abd commit 8f02d93

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ RUN GOOS=linux GOARCH=amd64 packr build -o ../../release/ssl-game-controller_lin
1616
# Start fresh from a smaller image
1717
FROM alpine:3.9
1818
COPY --from=build_go /go/src/github.com/RoboCup-SSL/ssl-game-controller/release/ssl-game-controller_linux_amd64 /app/ssl-game-controller
19+
COPY config config
20+
WORKDIR /work
1921
EXPOSE 8081 10007 10008 10011 10009
2022
ENTRYPOINT ["/app/ssl-game-controller", "-address", ":8081"]
2123
CMD []

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ See [FAQ](./FAQ.md) for some general information.
1515
## Usage
1616
If you just want to use this app, simply download the latest [release binary](https://github.com/RoboCup-SSL/ssl-game-controller/releases/latest). The binary is self-contained. No dependencies are required.
1717

18+
You can also use pre-build docker images:
19+
```shell script
20+
docker pull robocupssl/ssl-game-controller
21+
# Run GC with default configuration
22+
docker run -p 8081:8081 robocupssl/ssl-game-controller
23+
# You can also mount the config and work directories locally
24+
docker run -p 8081:8081 \
25+
# Local config dir
26+
-v "$(pwd)"/config:/config \
27+
# Local working dir with the current state
28+
-v "$(pwd)"/work:/work \
29+
robocupssl/ssl-game-controller
30+
```
31+
1832
The controller will generate a default config file to [config/ssl-game-controller.yaml](config/ssl-game-controller.yaml) on the first start. Afterwards, you can change all settings there.
1933

2034
### Runtime Requirements

0 commit comments

Comments
 (0)