Skip to content

Instantly share code, notes, and snippets.

View irman's full-sized avatar
🎯
Doing stuff

Irman Ahmad irman

🎯
Doing stuff
View GitHub Profile
@npearce
npearce / install-docker.md
Last active November 11, 2024 13:09
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@irman
irman / _ec2-lightsail-amazon-linux-nginx-apache-proxy-php-7.md
Last active March 7, 2023 19:00
Setting up Nginx-Apache Reverse Proxy, PHP, & MariaDB with SSL on EC2/Lightsail with Amazon Linux

Setting up Nginx-Apache Reverse Proxy, PHP, & MariaDB with SSL on EC2/Lightsail with Amazon Linux

Final setup should consists of:

  1. NGINX (reverse proxy & static contents)
  2. Apache 2.4 (Dynamic content: PHP)
  3. PHP 7.1
  4. MariaDB 10.1
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE