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
|
# Use Debain 12 as the Base
|
||||||
FROM debian:12-slim
|
FROM ark.sudovanilla.org/korbs/debian-slim:amd64
|
||||||
|
|
||||||
# Run as root
|
# Run as root
|
||||||
USER root
|
USER root
|
||||||
|
@ -7,12 +7,15 @@ USER root
|
||||||
# Start Cron
|
# Start Cron
|
||||||
ENTRYPOINT cron start && tail -f /var/log/cron.log
|
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
|
RUN apt-get update && apt-get -y install libcurl4-openssl-dev g++ ca-certificates curl gnupg procps iputils-ping wget net-tools iproute2
|
||||||
|
|
||||||
# Cron
|
# Cron
|
||||||
RUN apt-get -y install -qq --force-yes cron
|
RUN apt-get -y install -qq --force-yes cron
|
||||||
RUN touch /var/log/cron.log
|
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
|
# The server admin(you) is expected to use "volume" configuration to override the Token
|
||||||
RUN curl -sSL netweak.sh | bash -s TOKEN_REPLACEMENT
|
RUN curl -sSL netweak.sh | bash -s TOKEN_REPLACEMENT
|
21
LICENSE
Normal file → Executable file
21
LICENSE
Normal file → Executable file
|
@ -1,9 +1,22 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2024 SudoVanilla
|
Copyright 2023-2025 SudoVanilla
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
In addition, the following restrictions apply:
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1. The Software and any modifications made to it may not be used for the purpose of training or improving machine learning algorithms,
|
||||||
|
including but not limited to artificial intelligence, natural language processing, or data mining. This condition applies to any derivatives,
|
||||||
|
modifications, or updates based on the Software code. Any usage of the Software in an AI-training dataset is considered a breach of this License.
|
||||||
|
|
||||||
|
2. The Software may not be included in any dataset used for training or improving machine learning algorithms,
|
||||||
|
including but not limited to artificial intelligence, natural language processing, or data mining.
|
||||||
|
|
||||||
|
3. Any person or organization found to be in violation of these restrictions will be subject to legal action and may be held liable
|
||||||
|
for any damages resulting from such use.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||||
|
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
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.
|
> This is an unofficial Docker Image for Netweak's agent.
|
||||||
|
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
### Requirements
|
### Requirements
|
||||||
- Supported OS:
|
- Supported OS:
|
||||||
|
@ -38,10 +37,10 @@ In the `docker-compose.yml` file, add the following:
|
||||||
services:
|
services:
|
||||||
netweak-agent:
|
netweak-agent:
|
||||||
# For AMD64 Machines:
|
# For AMD64 Machines:
|
||||||
image: ark.sudovanilla.org/korbs/netweak-agent:amd64
|
image: oci.registry.sudovanilla.org/netweak-agent:amd64
|
||||||
# For ARM64/V8 Machines:
|
# For ARM64/V8 Machines:
|
||||||
# image: ark.sudovanilla.org/korbs/netweak-agent:arm64
|
# image: oci.registry.sudovanilla.org/netweak-agent:arm64
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
container_name: netweak_agent
|
container_name: netweak_agent
|
||||||
volumes:
|
volumes:
|
||||||
- ./token.conf:/etc/netweak/token.conf
|
- ./token.conf:/etc/netweak/token.conf
|
||||||
|
@ -52,7 +51,7 @@ Run the Docker Pull command to get download the Docker image:
|
||||||
docker compose pull
|
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.
|
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.
|
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
|
## Questions and Answers
|
||||||
**Does this support macOS and Windows?**
|
**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.
|
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?**
|
**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.
|
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.**
|
**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.
|
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?**
|
**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
|
image: ark.sudovanilla.org/korbs/netweak-agent:amd64
|
||||||
# For ARM64/V8 Machines:
|
# For ARM64/V8 Machines:
|
||||||
# image: ark.sudovanilla.org/korbs/netweak-agent:arm64
|
# image: ark.sudovanilla.org/korbs/netweak-agent:arm64
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
container_name: netweak_agent
|
container_name: netweak_agent
|
||||||
volumes:
|
volumes:
|
||||||
- ./token.conf:/etc/netweak/token.conf
|
- ./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