Skip to content

Instantly share code, notes, and snippets.


Damian Naprawa dnaprawa

View GitHub Profile
dnaprawa /
Created May 13, 2021 — forked from soheilhy/
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

dnaprawa /
Last active Apr 24, 2021
Elasticsearch with nginx proxy - Kubernetes
apiVersion: apps/v1
kind: Deployment
  name: elasticsearch
    matchLabels: elasticsearch
dnaprawa /
Last active Apr 21, 2021
Kubernetes Dashboard with Metrics Server

Install Kubernetes Dashboard

kubectl apply -f

Patch the dashboard to allow skipping login

kubectl patch deployment kubernetes-dashboard -n kubernetes-dashboard --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--enable-skip-login"}]'
dnaprawa /
Created Feb 1, 2021
Install Docker & docker-compose on Ubuntu/Debian

Create a .sh file - eg. and paste following:


sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL -o
sudo sh
sudo usermod -aG docker $USER
dnaprawa /
Created Jan 27, 2021 — forked from ruanbekker/
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
dnaprawa /
Last active Apr 29, 2022
Using Docker on remote Docker Host with docker context

Working on remote Docker Host using docker context

SSH keys on Windows

In order to use remote Docker host, as a prerequisite you need SSH enabled (required login using SSH keys).

Generate or find your public SSH key

Go to C:\Users\YOUR_USERNAME\.ssh and copy content of file

dnaprawa /
Last active Nov 22, 2020
Running Minecraft Server using Docker (and docker-compose)

Running Minecraft Server using Docker (and docker-compose)

With over 126 million monthly users, 200 million games sold & 40 million MAU, Minecraft still remains one of the biggest games on the planet.

Why minecraft inside Docker?

  • for fun of course! :)
  • can be run locally for your kids
  • you can run it on popular and low-cost Rasperry PI inside your home and/or in the cloud
dnaprawa /
Last active Aug 16, 2022
Apple M1 workaround for Docker

Apple M1 workaround for Docker


You need a dedicated Linux machine (linux-vm) (in the cloud or on your VPS, or bare-metal) with Docker installed and SSH enabled (required login using SSH keys).

Workaround for people who have SSH access to a docker installed linux machine

Install go (pre-compiled binaries at

(Edit: there are no Darwin arm64 yet, You need to compile or use Homebrew...)

dnaprawa / docker-compose.yml
Created Jul 2, 2020
Sample YAML file to run MySQL & phpMyAdmin using Docker (docker-compose)
View docker-compose.yml
version: '3.7'
container_name: phpmyadmin
image: phpmyadmin/phpmyadmin:latest
restart: always
- 8081:80