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

docker build --build-arg PHP_VERSION=7.3 --build-arg TIMEZONE=America/Bogota --target prod -t licensor:prod -f .docker/php/Dockerfile .
Create image and push to microk8s using local registry based in this guide https://blog.payara.fish/what-is-kubernetes
docker build --target prod -t uva3/licensor:prod -f .docker/php/Dockerfile .
docker push uva3/licensor:prod
Pull image to registr microk8s
docker build --target prod -t localhost:32000/licensor:prod -f .docker/php/Dockerfile .
docker push localhost:32000/licensor:prod
@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 / Vademecum.txt
Last active September 2, 2019 20:30
Vademecum bash
Install docker
https://www.digitalocean.com/community/tutorials/como-instalar-y-usar-docker-en-ubuntu-18-04-1-es
Install Docker Composer
curl -L https://github.com/docker/compose/releases/download/VERSION_NUM/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
# I'd use this example to resolve my own problem that was get a number in string.
# sed 's/^.*\(consectetuer.*elit\).*$/\1/' file
@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)