Skip to content

Commit 8800bff

Browse files
authored
server/README.md: Clarify Docker build context (#398)
Previously, #386 proposed narrowing the scope of the build context for 'server/Dockerfile' to '/server'. As a consequence, `/sdk`, which is required to build the server, would no longer be accessible. Locally, this would necessitate explicitly referencing `/sdk` as a second build context. When using the GitHub URL of this repository as build context instead of a local repository, this would additionally lead to inefficient data handling. Since Docker Compose does not yet support sparse checkouts, specifying subdirectories like `/server` as build context still results in the full repository being cloned. Consequently, although `/sdk` would be downloaded, it would be excluded from the narrowed build context and thus remain unavailable. Any attempt to include `/sdk` separately afterwards would result in the same data being downloaded again. As this is an inefficient solution, #386 is rejected. 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 5043c20 commit 8800bff

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)