kopia lustrzana https://github.com/markqvist/reticulum
tweak docker files
rodzic
a17d20bded
commit
7dfa6ee596
|
@ -9,7 +9,7 @@ RUN pip install rns
|
||||||
|
|
||||||
FROM python:3.13-alpine
|
FROM python:3.13-alpine
|
||||||
|
|
||||||
COPY --from=build /usr/local/bin/ /usr/local/bin/
|
COPY --from=build /usr/local/ /usr/local/
|
||||||
|
|
||||||
RUN mkdir /config
|
RUN mkdir /config
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ RUN pip install /tmp/rns-*.whl
|
||||||
|
|
||||||
FROM python:3.13-alpine
|
FROM python:3.13-alpine
|
||||||
|
|
||||||
COPY --from=build /usr/local/bin/ /usr/local/bin/
|
COPY --from=build /usr/local/ /usr/local/
|
||||||
|
|
||||||
RUN mkdir /config
|
RUN mkdir /config
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,14 @@ Docker resources Reticulum service and tooling
|
||||||
|
|
||||||
## End-user
|
## End-user
|
||||||
|
|
||||||
As an end-user you can make use of the `Dockerfile` to create a simple docker image based on the latest `rns` package available in [PyPi](https://pypi.org/project/rns/)
|
As an end-user you can either:
|
||||||
|
|
||||||
### Building
|
- grab prebuilt docker images from the github container registry @ `ghcr.io/markqvist/reticulum:latest`
|
||||||
|
- use of the `Dockerfile` to create a simple docker image based on the latest `rns` package available at [PyPi](https://pypi.org/project/rns/)
|
||||||
|
|
||||||
To build the image:
|
### Building from `Dockerfile`
|
||||||
|
|
||||||
|
To build the image, choose one:
|
||||||
|
|
||||||
- Copy the `Dockerfile` to a directory and in that directory run:
|
- Copy the `Dockerfile` to a directory and in that directory run:
|
||||||
- `docker build -t reticulum:latest .`
|
- `docker build -t reticulum:latest .`
|
||||||
|
@ -24,6 +27,8 @@ You can run the container in various ways, a quick way to test would be interact
|
||||||
- Create a directory to hold the configuration and other files - `mkdir config`
|
- Create a directory to hold the configuration and other files - `mkdir config`
|
||||||
- Start the container - `docker run --rm --name reticulum -v ./config:/config -it reticulum:latest`
|
- Start the container - `docker run --rm --name reticulum -v ./config:/config -it reticulum:latest`
|
||||||
|
|
||||||
|
Replace the image name to match either the one you built or pre-built github versions.
|
||||||
|
|
||||||
This will create a container named `reticulum`, mount the config directory to the directory you created above in your current working directory (`./config`) and automatically delete que container (`--rm`) when you detach from the session (files in the config directory will be retained)
|
This will create a container named `reticulum`, mount the config directory to the directory you created above in your current working directory (`./config`) and automatically delete que container (`--rm`) when you detach from the session (files in the config directory will be retained)
|
||||||
|
|
||||||
You can edit the config file at `./config/config` to configure rns as usual
|
You can edit the config file at `./config/config` to configure rns as usual
|
||||||
|
@ -40,9 +45,6 @@ You can also use the included example `docker-compose.yml` file to manage the co
|
||||||
|
|
||||||
## Developer
|
## Developer
|
||||||
|
|
||||||
The file `Dockerfile.dist` is meant to be used for CI, its similar to the end-user Dockerfile except that it will grab and install wheel files from the `/dist` directory instead
|
The file `Dockerfile.release` is meant to be used for CI, its similar to the end-user Dockerfile except that it will grab and install wheel files from the artifacts generated by the `package` job in the build workflow.
|
||||||
This could be used in this order:
|
|
||||||
- `make build_wheel`
|
There are image builds available for both releases and pushes to branches to facilitate quick testing.
|
||||||
- Build the container with `Dockerfile.dist`
|
|
||||||
- Via github workflows
|
|
||||||
- Manually `docker build -t reticulum:latest -f docker/Dockerfile.dist .`
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
services:
|
services:
|
||||||
reticulum:
|
reticulum:
|
||||||
container_name: reticulum
|
container_name: reticulum
|
||||||
image: reticulum:latest
|
image: ghcr.io/markqvist/reticulum:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
# Mount the config directory on the host in the same location as the docker-compose.yml
|
# Mount the config directory on the host in the same location as the docker-compose.yml
|
||||||
# to allow data persistency
|
# to allow data persistency
|
||||||
|
|
Ładowanie…
Reference in New Issue