Skip to content

Instantly share code, notes, and snippets.

View collabnix's full-sized avatar
🐳
Docker ! Docker ! Docker !

Collabnix collabnix

🐳
Docker ! Docker ! Docker !
View GitHub Profile
@collabnix
collabnix / compose-on-jetson.txt
Last active April 26, 2024 21:02
Installing Docker Compose on NVIDIA Jetson Nano
NVIDIA Jetson Nano SD card image comes with Docker binaries installed. You an verify it:
root@pico1:/home/pico# docker version
Client:
Version: 19.03.6
API version: 1.40
Go version: go1.12.17
Git commit: 369ce74a3c
Built: Fri Feb 28 23:47:53 2020
@collabnix
collabnix / docker-compose.yml
Created April 13, 2023 05:54
Docker Compose File Watch
version: '3.6'
services:
app:
build: .
x-develop:
watch:
- action: rebuild
path: .
command: sh -c "yarn install && yarn run dev"
ports:
@collabnix
collabnix / service.yaml
Created April 8, 2023 01:04
Todo List app on Kubernetes
apiVersion: v1
kind: Service
metadata:
name: node-app-service
spec:
selector:
app: node-app
ports:
- name: http
protocol: TCP
@collabnix
collabnix / final.yaml
Created April 8, 2023 01:03
YAML file for Todo List Apps
kind: Deployment
metadata:
name: node-app
labels:
app: node-app
spec:
replicas: 1
selector:
matchLabels:
app: node-app
@collabnix
collabnix / bme680.py
Created April 1, 2023 04:50
A Python script to fetch sensor values
import time
import smbus2
import bme680
# Set up BME680 sensor object
bus = smbus2.SMBus(1) # Use I2C bus 1
bme = bme680.BME680(bme680.I2C_ADDR_PRIMARY, bus)
# Set up oversampling settings for temperature, pressure, and humidity readings
bme.set_humidity_oversample(bme680.OS_2X)
@collabnix
collabnix / fix-my-system.py
Created March 19, 2023 12:29
Docker Diagnostic Tool Integrated with ChatGPT
import subprocess
import re
import openai
openai.api_key = "sk-peVXXXXXXXg8PPY0QuCYKPT"
def run_diagnose_tool():
# Run the Docker Desktop self-diagnose tool and capture the output
tool_location = "/Applications/Docker.app/Contents/MacOS/com.docker.diagnose"
result = subprocess.run([tool_location, "check"], stdout=subprocess.PIPE)
output = result.stdout.decode()
@collabnix
collabnix / gist:d9298ac93a91f369e17ae28eac03e524
Created January 19, 2023 11:58
How to Deploy a set of Microservices with a specified version using Docker?
#!/bin/bash
# Get the version of service1
version_service1=$1
# Get the version of service2
version_service2=$2
# Get any additional parameters
additional_param_1=$3
# Start service1 with the specified version
@collabnix
collabnix / install-client-bundle.sh
Created October 19, 2018 11:05
Installing Docker Client Bundle for Docker Enterprise 2.0
#Download client certificates by using the REST API
#You can also download client bundles by using the UCP REST API. In this example, we use curl to make the web requests to the API, jq to parse the responses, and unzip to unpack the zip archive.
#To install these tools on an Ubuntu distribution, you can run:
sudo apt-get update && sudo apt-get install curl jq unzip
# Create an environment variable with the user security token
AUTHTOKEN=$(curl -sk -d '{"username":"<username>","password":"<password>"}' https://<ucp-ip>/auth/login | jq -r .auth_token)
version: '3'
services:
redis-commander:
build: https://github.com/collabnix/Redisai_edgeAnalytics.git
redisedge:
build: ./redisedge
ports:
- 6379:6379
init:
@collabnix
collabnix / gist:2a61843849fd2109b44061f8049e85b3
Created September 4, 2020 06:00
2 Minutes to Minecraft Server using Docker
docker run -d -p 25565:25565 -e EULA=true -e ONLINE_MODE=false -e DIFFICULTY=hard -e OPS=Gurvira3 -e MAX_PLAYERS=50 -e 'MOTD=Welcome to Gurvira World' --name mc itzg/minecraft-server