AI-powered malware detection library with neural network implementation for C++.
10K+
This guide explains how to build, run, and deploy the Malware Detector Library using Docker containers.
# Pull and run the latest image
docker run -p 80:80 -p 3000:3000 ghcr.io/galihru/malware-detector-cpp:latest
# Or use docker-compose
docker-compose up -d
Access the application at:
# Build with default settings
docker build -t malware-detector .
# Build with specific version
docker build --build-arg VERSION=1.2.3 -t malware-detector:1.2.3 .
# Build using the build script
chmod +x docker/build.sh
./docker/build.sh build
# Test the built image
./docker/build.sh test
# Or manually test
docker run -d -p 8080:80 --name test-container malware-detector
curl http://localhost:8080/
docker stop test-container && docker rm test-container
# Start development environment
docker-compose -f docker-compose.dev.yml up --build
# With file watching
docker-compose -f docker-compose.dev.yml up --build file-watcher
| Variable | Default | Description |
|---|---|---|
NODE_ENV | production | Environment mode |
API_PORT | 3000 | API server port |
WEB_PORT | 80 | Web server port |
UPLOAD_MAX_SIZE | 100MB | Maximum upload size |
ENABLE_DEMO | true | Enable demo functionality |
LOG_LEVEL | info | Logging level |
docker run -p 80:80 \
-v $(pwd)/docs:/app/docs \
-v $(pwd)/uploads:/app/uploads \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/models:/app/models \
malware-detector
# Create a personal access token with packages:read and packages:write scopes
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
# Latest version
docker pull ghcr.io/galihru/malware-detector-cpp:latest
# Specific version
docker pull ghcr.io/galihru/malware-detector-cpp:1.2.3
# List available tags
curl -s https://api.github.com/users/galihru/packages/container/malware-detector-cpp/versions | jq '.[].metadata.container.tags'
# Tag for GitHub Packages
docker tag malware-detector ghcr.io/galihru/malware-detector-cpp:latest
# Push to registry
docker push ghcr.io/galihru/malware-detector-cpp:latest
# Or use the build script
./docker/build.sh push
# Production compose file
docker-compose -f docker-compose.yml up -d
# With custom configuration
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
# Initialize swarm
docker swarm init
# Deploy stack
docker stack deploy -c docker-compose.yml malware-detector
# Scale services
docker service scale malware-detector_malware-detector=3
The container includes a health check that verifies:
# Check health status
docker inspect --format='{{.State.Health.Status}}' CONTAINER_ID
# View health check logs
docker inspect --format='{{range .State.Health.Log}}{{.Output}}{{end}}' CONTAINER_ID
# Manual health check
docker exec CONTAINER_ID /app/docker/healthcheck.sh
# Real-time stats
docker stats
# Container logs
docker-compose logs -f malware-detector
# Service-specific logs
docker-compose logs -f malware-detector nginx
/app/logs//var/log/nginx//var/log/supervisor/Port conflicts:
# Use different ports
docker run -p 8080:80 -p 3001:3000 malware-detector
Permission issues:
# Fix file permissions
docker exec -it CONTAINER_ID chown -R www-data:www-data /app/docs
Memory issues:
# Increase memory limit
docker run --memory=1g malware-detector
# Run with debug environment
docker run -e LOG_LEVEL=debug -e NODE_ENV=development malware-detector
# Interactive shell
docker exec -it CONTAINER_ID /bin/bash
| Script | Description |
|---|---|
docker/build.sh | Build and test Docker images |
docker/healthcheck.sh | Container health verification |
docker/entrypoint.sh | Container initialization |
MIT License - see LICENSE file for details.
Content type
Image
Digest
sha256:4770508b0…
Size
325.6 MB
Last updated
about 1 year ago
docker pull galihridhoutomo/malware-detector