Commit Graph

8 Commits

Author SHA1 Message Date
Aleksei Stepanov
c004adfb8c Fix docker image build
* Use non-rc python
* Use `pip` for package install
  `python setup.py --install` is deprecated by setuptools
2024-01-23 08:45:58 +01:00
Mark Qvist
a6eac0d7ce Configure python for unbuffered stdout in Docker images 2022-05-18 16:18:13 +02:00
JP Hastings-Spital
3fc321e804
Move --daemon to CMD from ENTRYPOINT
I've moved the `--daemon` command from `ENTRYPOINT` to `CMD` to allow users of the dockerfile some flexibility 

The executable and/or arguments in `CMD` can be overridden easily by users of the container, but `ENTRYPOINT` is intended as a "this is always at the start of the command". ([reference](https://docs.docker.com/engine/reference/builder/#cmd))

For example, with the change in this commit:
- `docker run ghcr.io/markqvist/nomadnet:master --help` will output the same as `nomadnet --help`
- `docker run ghcr.io/markqvist/nomadnet:master` will run `nomadnet --daemon`
- `docker run ghcr.io/markqvist/nomadnet:master ""` will run `nomadnet` (if we wanted this to be a little more self-explaining, there could be a `--ui` flag which runs the UI and is default-on, so `docker run ghcr.io/markqvist/nomadnet:master --ui` would work)
2022-05-18 08:56:45 +01:00
Mark Qvist
b312bd97e0 Run nomadnet as daemon in docker 2022-05-17 22:44:38 +02:00
Mark Qvist
d8e84409c7 Fixed dockerfile 2022-05-17 22:43:08 +02:00
Mark Qvist
bc7231def0 Updated readme and dockerfile 2022-05-17 13:19:35 +02:00
Mark Qvist
73fb44dcc3 Updated readme and dockerfile 2022-05-17 13:18:55 +02:00
JP Hastings-Spital
a917cbf010 Automated docker build for nomadnet daemon
Uses a Github Action (`.github/workflows/publish-container.yml`) to create a
docker container image (from `Dockerfile`) that represents an extremely minimal
python installation with a virtualenv holding all requirements necessary to
execute `nomadnet`.

New docker images are created on pushes to `master` or pushes to tags
matching `*.*.*` (ie. version tags) and are retrievable with those tags.

Examples:

```sh
$ docker pull ghcr.io/markqvist/nomadnet:master

# Print docker labels, to demonstrate the image has been retrieved
$ docker inspect -f '{{json .Config.Labels}}' ghcr.io/markqvist/nomadnet:master | jq
{
  "org.opencontainers.image.created": "2022-04-27T06:01:55.894Z",
  "org.opencontainers.image.description": "Communicate Freely",
  "org.opencontainers.image.licenses": "GPL-3.0",
  "org.opencontainers.image.revision": "59cffc4a9de0f276d2cc87537ff1316aed5f16dd",
  "org.opencontainers.image.source": "https://github.com/markqvist/NomadNet",
  "org.opencontainers.image.title": "NomadNet",
  "org.opencontainers.image.url": "https://github.com/markqvist/NomadNet",
  "org.opencontainers.image.version": "master"
}

# Run nomadnet interactively without installing it (with default config)
$ docker run -it ghcr.io/markqvist/nomadnet:master

# Run nomadnet as a daemon, using config stored on the host machine in specific directories
$ docker run -d -v /local/path/nomadnetconfig/:/root/.nomadnetwork/ -v /local/path/reticulumconfig/:/root/.reticulum/:rw ghcr.io/markqvist/nomadnet:master
```

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Tue Apr 26 23:50:22 2022 +0100
#
# On branch dockerfile
# Changes to be committed:
#	new file:   .dockerignore
#	new file:   .github/workflows/publish-container.yml
#	new file:   Dockerfile
#	modified:   README.md
#

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Tue Apr 26 23:50:22 2022 +0100
#
# On branch dockerfile
# Changes to be committed:
#	new file:   .dockerignore
#	new file:   .github/workflows/publish-container.yml
#	new file:   Dockerfile
#	modified:   README.md
#

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Tue Apr 26 23:50:22 2022 +0100
#
# On branch dockerfile
# Changes to be committed:
#	new file:   .dockerignore
#	new file:   .github/workflows/publish-container.yml
#	new file:   Dockerfile
#	modified:   README.md
#
2022-04-27 21:42:59 +01:00