Skip to content

Commit c1a823a

Browse files
committed
update package to docker image readme
Co-authored-by: MCJ Vasseur <[email protected]> Fix tar command to work with absolute source path by computing dirname and basename, as executing from the wrong directory can cause the build to fail
1 parent 55881c8 commit c1a823a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docker/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,10 @@ where `version` is the DOMjudge version to create the images for, e.g. `5.3.0`.
263263

264264
To build domjudge with local sources, run
265265
```bash
266-
tar --exclude-vcs -czf <path to domjudge-packaging>/docker/domjudge.tar.gz <domjudge source directory>
267-
cd <path to domjudge-packaging>/docker
266+
dj_packaging_dir=<path to domjudge-packaging>
267+
dj_source_dir =<domjudge source directory>
268+
tar --exclude-vcs -czf "${dj_packaging_dir}/docker/domjudge.tar.gz" -C $(dirname "$dj_source_dir") $(basename "$dj_source_dir")
269+
cd ${dj_packaging_dir}/docker
268270
docker build -t domjudge -f domserver/Dockerfile .
269271
```
270272
Note that the source directory name has to match `domjudge-*`.

0 commit comments

Comments
 (0)