Skip to content

Commit cab5bf2

Browse files
committed
server/README.md: Clarify Docker build context
Previously, narrowing the Docker build context of `server/Dockerfile` to `/server` was discussed to reduce scope. However, this would exclude `/sdk`, which is needed for building the server. Locally, it would then be necessary to explicitly reference `/sdk` as a second build context. Externally, when using the link to this GitHub repository as build context, it would lead to unnecessary cloning. As Docker does not yet support sparse checkouts, referencing subdirectories such as `/server` results in the entire repository being cloned regardless. Therefore, the required `/sdk` would be cloned but made unavailable by narrowing the build context. Any second clone of `/sdk` would therefore result in data that had already been downloaded being downloaded again. To include `/sdk` efficiently, the build context must remain the repository root. This documents the decision of keeping the repository root as the build context of `server/Dockerfile`. A corresponding note was added in `server/README.md`. Additionally, a mention of faulty line endings being a common error when building the Docker container has been added in `server/README.md`. Fixes #386
1 parent e043960 commit cab5bf2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The container image can be built via:
1818
$ docker build -t basyx-python-server -f Dockerfile ..
1919
```
2020

21+
Note that when cloning this repository on Windows, Git may convert the line separators to CRLF. This breaks `entrypoint.sh` and `stop-supervisor.sh`. Ensure both files use LF line separators before building.
22+
2123
## Running
2224

2325
### Storage
@@ -77,12 +79,13 @@ services:
7779
- "8080:80"
7880
volumes:
7981
- ./storage:/storage
80-
8182
````
8283

8384
Here files are read from `/storage` and the server can be accessed at http://localhost:8080/api/v3.0/ from your host system.
8485
To get a different setup this compose.yaml file can be adapted and expanded.
8586

87+
Note that the `Dockerfile` has to be specified explicitly, as the build context must be set to the parent directory of `/server` to allow access to the local `/sdk`.
88+
8689
## Acknowledgments
8790

8891
This Dockerfile is inspired by the [tiangolo/uwsgi-nginx-docker][10] repository.

0 commit comments

Comments
 (0)