Skip to content

Instantly share code, notes, and snippets.

View frcho's full-sized avatar

Luis Fernando Granados frcho

  • Carvajal
  • Colombia
View GitHub Profile

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. bash <(curl -sL https://gist.githubusercontent.com/frcho/811981b64850271d3720a326504d56b6/raw/d60ca12cb5c35f0aa410ffb106e016f60631c153/install-docker.sh)

Links

@frcho
frcho / EntityBase.php
Created November 3, 2019 03:43
symfony doctrine updatedAt createdAt updated_at created_at fields timestamp
<?php
namespace AppBundle\Mapping;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
/**
* Class EntityBase
*
@frcho
frcho / AdbCommands
Created May 25, 2019 00:46 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@frcho
frcho / DownloadRemoteFileWithProgressCommand.php
Created March 8, 2019 21:26 — forked from Muspi/DownloadRemoteFileWithProgressCommand.php
Command for Symfony 3 & 4.Allow to download a remote file to server, and display ProgressBar.
<?php
/**
* Created by PhpStorm.
* User: Muspi
* Date: 29/05/2018
* Time: 16:19
*/
namespace AppBundle\Command;
@frcho
frcho / install.sh
Last active August 14, 2020 00:50 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@frcho
frcho / helpful-docker-commands.sh
Created October 23, 2018 15:41 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@frcho
frcho / Makefile
Created October 9, 2018 22:33 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@frcho
frcho / 1-WSL and Docker for Windows.md
Created September 28, 2018 00:49 — forked from kekru/1-WSL and Docker for Windows.md
Windows 10 Subsystem for Linux combined with Docker for Windows

Using Windows Subsystem for Linux combined with Docker for Windows

Docker CE for Windows

  • Install Docker CE for Windows
  • Go to Docker for Windows Settings -> General and enable Expose daemon on tcp://localhost:2375 without TLS.
    This will enable the Docker remote API for requests, coming from localhost, not from another computer in your network. A TLS secured version is not yet supported in Docker for Windows. See docker/for-win#453 for more information. I also tried a daemon.json file with options tlscacert, tlscert, tlskey and tlsverify, but Docker for Windows crashed on booting.

Install Windows Subsystem for Linux (WSL)

@frcho
frcho / socket.io-1-0-apache-2.4-ssl.conf
Created July 5, 2018 16:15 — forked from iacchus/socket.io-1-0-apache-2.4-ssl.conf
Set reverse proxy websockets in Apache 2.4 using socket.io 1.0. Needs mod_rewrite module, this version uses SSL. As seen here https://serverfault.com/questions/616370/configuring-apache-2-4-mod-proxy-wstunnel-for-socket-io-1-0
<VirtualHost *:80>
ServerName forum.example.com
Redirect permanent / https://forum.example.com
</VirtualHost>
<VirtualHost *:443>
ServerName forum.example.com
@frcho
frcho / create-project.sh
Created December 15, 2017 20:25 — forked from jasonlewis/create-project.sh
Bash script that creates a new project and virtual host for that project. Can also be used to quickly create a new Laravel project.
#!/bin/bash
# This script creates a new project (or site) under /var/sites and creates
# new virtual host for that site. With the options a site can also
# install the latest version of Laravel directly.
# This script was originally based on the following script by @Nek from
# Coderwall: https://coderwall.com/p/cqoplg
# Display the usage information of the command.
create-project-usage() {