mirror of
https://ark.sudovanilla.org/Korbs/Netweak-Agent-Docker.git
synced 2024-12-22 11:33:53 +00:00
Compare commits
6 commits
5f4fa0cdcb
...
5dcc4ca125
Author | SHA1 | Date | |
---|---|---|---|
Korbs | 5dcc4ca125 | ||
Korbs | 30bfb38423 | ||
Korbs | b87886667d | ||
Korbs | 6f59b3ae2e | ||
Korbs | 982d883858 | ||
Korbs | ad922a1662 |
7
Dockerfile
Normal file → Executable file
7
Dockerfile
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
# Use Debain 12 as the Base
|
||||
FROM debian:12-slim
|
||||
FROM ark.sudovanilla.org/korbs/debian-slim:amd64
|
||||
|
||||
# Run as root
|
||||
USER root
|
||||
|
@ -7,12 +7,15 @@ USER root
|
|||
# Start Cron
|
||||
ENTRYPOINT cron start && tail -f /var/log/cron.log
|
||||
|
||||
# Install nessesary packages
|
||||
# Install necessary packages
|
||||
RUN apt-get update && apt-get -y install libcurl4-openssl-dev g++ ca-certificates curl gnupg procps iputils-ping wget net-tools iproute2
|
||||
|
||||
# Cron
|
||||
RUN apt-get -y install -qq --force-yes cron
|
||||
RUN touch /var/log/cron.log
|
||||
|
||||
# Cleanup
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# The server admin(you) is expected to use "volume" configuration to override the Token
|
||||
RUN curl -sSL netweak.sh | bash -s TOKEN_REPLACEMENT
|
42
README.md
Normal file → Executable file
42
README.md
Normal file → Executable file
|
@ -3,7 +3,6 @@
|
|||
|
||||
> This is an unofficial Docker Image for Netweak's agent.
|
||||
|
||||
|
||||
## Running
|
||||
### Requirements
|
||||
- Supported OS:
|
||||
|
@ -38,10 +37,10 @@ In the `docker-compose.yml` file, add the following:
|
|||
services:
|
||||
netweak-agent:
|
||||
# For AMD64 Machines:
|
||||
image: ark.sudovanilla.org/korbs/netweak-agent:amd64
|
||||
image: oci.registry.sudovanilla.org/netweak-agent:amd64
|
||||
# For ARM64/V8 Machines:
|
||||
# image: ark.sudovanilla.org/korbs/netweak-agent:arm64
|
||||
restart: unless-stopped
|
||||
# image: oci.registry.sudovanilla.org/netweak-agent:arm64
|
||||
restart: always
|
||||
container_name: netweak_agent
|
||||
volumes:
|
||||
- ./token.conf:/etc/netweak/token.conf
|
||||
|
@ -52,7 +51,7 @@ Run the Docker Pull command to get download the Docker image:
|
|||
docker compose pull
|
||||
```
|
||||
|
||||
![](https://md.sudovanilla.org/images/nafd-int-token.png)
|
||||
![Banner](https://md.sudovanilla.org/images/nafd-int-token.png)
|
||||
|
||||
Now, try adding a new server to your Netweak dashboard and grab the token. The instructions on screen will show a command, you don't need this command for this setup, but you need the randomly generated token that is at the end of the provided command. Copy that and paste it into the `token.conf` file.
|
||||
|
||||
|
@ -65,12 +64,30 @@ docker compose up -d
|
|||
|
||||
After a few moment, Netweak will detect the agent if you've setup things correctly.
|
||||
|
||||
## Build
|
||||
### Docker
|
||||
To build the image, use the Docker Build command line:
|
||||
```bash
|
||||
docker build -t netweak-agent . -f Dockerfile.default
|
||||
```
|
||||
> Using `sudo` may be required depending on your setup.
|
||||
|
||||
### Buildah
|
||||
SudoVanilla uses Buildah over Docker Engine to build it's Docker images, since the SudoVanilla Registry is powered by Zot.
|
||||
|
||||
To build the image, use the Buildah Build command line:
|
||||
```bash
|
||||
buildah build -t oci.registry.sudovanilla.org/netweak-agent:amd64
|
||||
```
|
||||
|
||||
## Questions and Answers
|
||||
**Does this support macOS and Windows?**
|
||||
|
||||
Yes, by using Docker it does support both of these operating systems. This has been tested successfully on a Mac Mini M2 running macOS 13/14.
|
||||
|
||||
This should also work on the Raspberry Pi 4 and up. Although, this has not been tested. Contact me or leave an issue if you've gotten this to run on a Raspberry Pi, I would like to know.
|
||||
**It doesn't run on ARM64/v7**
|
||||
|
||||
SudoVanilla builds it's Docker images on ARM64/v8 and AMD64 only. You'll need to build the image itself on your ARM64/v7 server, which is not too hard to do. Just follow the build instructions.
|
||||
|
||||
**Can I really trust providing my server's token?**
|
||||
|
||||
|
@ -80,13 +97,22 @@ SudoVanilla does not have access to any Docker containers you run on your server
|
|||
|
||||
This depends on how Docker is setup, I've not yet looked into correcting this behavior.
|
||||
|
||||
**CPU information is wrong, why is this?**
|
||||
|
||||
The CPU may show up as "N/A" on certain machines. A real example is a Mac Mini M2 running Asahi Linux. If you don't want it to show up as "N/A" anymore, switch to the custom Docker image by adding `-custom` before the tag in the image name. The custom build will modify the Agent file to show the CPU model as "Docker Engine".
|
||||
|
||||
`oci.registry.sudovanilla.org/netweak-agent-custom:amd64`
|
||||
|
||||
**Why does it say I'm running Debian? I'm not.**
|
||||
|
||||
This Docker Image is based on slim edition of Debian 12. When the Netweak agent runs in this Docker Image, it will detect this and assume you're using Debian 12. This is expected behavior.
|
||||
|
||||
**Is this an offical Docker Image for Netweak?**
|
||||
https://ark.sudovanilla.org/Korbs/-/packages/container/debian-slim/amd64
|
||||
|
||||
**Is this an official Docker Image for Netweak?**
|
||||
|
||||
No, SudoVanilla is not affiliated with Netweak in any way. This is NOT an official Docker image. SudoVanilla is only an enterprise customer of Netweak and wanted to monitor other non-Linux servers.
|
||||
|
||||
No, SudoVanilla is not affiliated with Netweak in any way. This is NOT an official Docker image. SudoVanilla is only an enterprise customer of Netweak.
|
||||
|
||||
**How do I uninstall the agent?**
|
||||
|
||||
|
|
8
buildah.sh
Executable file
8
buildah.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
# Buildah
|
||||
## This used to build the image with the correct metadata.
|
||||
## Buildah is used over Docker to push to SudoVanilla's registry properly.
|
||||
buildah build -t oci.registry.sudovanilla.org/netweak-agent:amd64 \
|
||||
--annotation 'org.opencontainers.image.vendor=SudoVanilla' \
|
||||
--annotation 'org.opencontainers.image.source=https://ark.sudovanilla.org/Korbs/Netweak-Agent-Docker/' \
|
||||
--annotation 'org.opencontainers.image.description=Netweak Agent for Windows and macOS' \
|
||||
--annotation 'org.opencontainers.image.title=Netweak Agent'
|
2
docker-compose.yml
Normal file → Executable file
2
docker-compose.yml
Normal file → Executable file
|
@ -4,7 +4,7 @@ services:
|
|||
image: ark.sudovanilla.org/korbs/netweak-agent:amd64
|
||||
# For ARM64/V8 Machines:
|
||||
# image: ark.sudovanilla.org/korbs/netweak-agent:arm64
|
||||
restart: unless-stopped
|
||||
restart: always
|
||||
container_name: netweak_agent
|
||||
volumes:
|
||||
- ./token.conf:/etc/netweak/token.conf
|
0
token.conf
Normal file → Executable file
0
token.conf
Normal file → Executable file
Loading…
Reference in a new issue