sudo mkdir /etc/mesos-dns
sudo vi /etc/mesos-dns/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
turns out you don't need the bind mount. This works with current docker by just modifying the -g option in /etc/docker/defaults DOCKER_OPTS. I had previously tried this and maybe like you failed to get it to work, and looked to linking and bind mounting. | |
Tried on AWS EC2 VM on a Ubuntu 14.04 server, with a second block storage volume. | |
First prepare your new block storage, this will house the moved docker folder | |
First format and mount the new block storage device | |
mkfs.ext4 /dev/sdx | |
Mount it | |
create a mount point | |
mkdir /mnt/diskX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// para insertar fecha en campo textfield | |
new java.text.SimpleDateFormat("dd-MMM-yyyy HH:mm:ss z", java.util.Locale.US).format(new java.util.Date()) | |
// para mostrar fecha en español | |
new Locale("ES") | |
// usando groovy | |
new groovy.lang.GroovyShell().evaluate("Calendar cal = Calendar.getInstance(); cal.set(2009, 8, 8); return cal.getTime(); ") | |
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name app.bolpros.com 10.11.25.2:8000; | |
# Strict Transport Security | |
add_header Strict-Transport-Security max-age=2592000; | |
rewrite ^/mobile.*$ https://10.0.2.15/web_mobile/static/src/web_mobile.html permanent; | |
rewrite ^/webdav(.*)$ https://10.0.2.15/webdav/$1 permanent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Por lo general utilizo esto {,} cuando necesito crear archivos numerados: archivo1, archivo2, archivo”n”: | |
> [ rafael ] ~ $ touch archivo{1..3}.log | |
> [ rafael ] ~ $ ls -lt | |
total 0 | |
-rw-r--r-- 1 rafael 0xl337 0B Nov 4 00:52 archivo1.log | |
-rw-r--r-- 1 rafael 0xl337 0B Nov 4 00:52 archivo2.log | |
-rw-r--r-- 1 rafael 0xl337 0B Nov 4 00:52 archivo3.log | |
> [ rafael ] ~ $ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# when you try to start docker | |
# sudo systemctl start docker | |
# and the output is: Failed to start docker.service: Unit docker.service is masked. | |
# | |
# | |
# ls -la /etc/systemd/system | grep docker | |
# see for /dev/null if there is | |
systemctl unmask docker.service | |
systemctl unmask docker.socket | |
systemctl start docker.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IMAGE_IDS=$(docker images -q --filter="dangling=true") | |
if [ -n "$IMAGE_IDS" ]; then | |
docker rmi $IMAGE_IDS > /dev/null 2>&1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Docker Application Container Engine | |
Documentation=https://docs.docker.com | |
After=network.target docker.socket | |
Requires=docker.socket | |
[Service] | |
Type=notify | |
ExecStart=/usr/bin/docker daemon -g /home/oracle/docker/docker/ -H fd:// | |
MountFlags=slave |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 1 ] | |
NM=`uname -a && date` | |
NAME=`echo $NM | md5sum | cut -f1 -d" "` | |
then | |
ppa_name=`echo "$1" | cut -d":" -f2 -s` | |
if [ -z "$ppa_name" ] | |
then | |
echo "PPA name not found" | |
echo "Utility to add PPA repositories in your debian machine" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream php-handler { | |
server 127.0.0.1:9000; | |
#server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |
return 301 https://$server_name$request_uri; | |
} |