rom / iso pc engine
docker registry manager in GO
If you expect that IP address might change you could go the extra mile and do something like
docker container run -e "DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')"
..., this way every time you run your container, it’ll have the IP address available inside the container set to the DOCKER_HOST environment variable.
KVM
lowriter --convert-to pdf *.doc
limitation bande passante
docker config version swarm
mongodb backup / restore
registry client, cli & web example
populating a postgres DB in a container
Using GlusterFS with Docker swarm cluster
Build secrets and SSH forwarding in Docker 18.09
raspberry image os light
dispos en 10x50
backup files from a docker volume into /tmp/backup.tar
function docker-volume-backup() {
docker run --rm -v /media/sf_Volumes/:/backup -v "$1":/tmp/data busybox tar -cvf /backup/backup.tar -C /tmp/data .
}
restore files from /tmp/backup.tar into a docker volume
function docker-volume-restore() {
docker run --rm -v /home/bouquet/Volumes:/backup -v "$1":/tmp/data busybox tar -xvf /backup/backup.tar -C /tmp/data
echo "Double checking files..."
docker run --rm -v /home/bouquet/Volumes:/backup -v "$1":/tmp/data busybox ls -lh /tmp/data
}
8 bit
general {
#output_format = "dzen2"
output_format = "i3bar"
colors = true
interval = 5
}
order += "disk /"
order += "disk /home"
order += "wireless wlp2s0"
order += "battery 0"
order += "tztime local"
#order += "ipv6"
#order += "disk /"
#order += "disk /home"
#order += "run_watch DHCP"
#order += "run_watch VPN"
#order += "wireless wlp2s0"
#order += "ethernet eth0"
#order += "battery 0"
#order += "cpu_temperature 0"
#order += "disk /"
#order += "load"
#order += "tztime local"
#order += "tztime paris"
wireless wlp2s0 {
format_up = " %quality at %essid, %bitrate %ip "
format_down = " wlp2s0: down "
}
ethernet eth0 {
# if you use %speed, i3status requires the cap_net_admin capability
format_up = "E: %ip (%speed)"
format_down = "E: down"
}
battery 0 {
#format = "%status %percentage %remaining %emptytime"
format = "%status %percentage %remaining "
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
}
run_watch DHCP {
pidfile = "/var/run/dhclient*.pid"
}
run_watch VPN {
pidfile = "/var/run/vpnc/pid"
}
tztime local {
#format = " %d-%m-%Y %H:%M:%S "
format = " %d-%m-%Y %H:%M "
}
tztime paris {
format = "%d-%m-%Y %H:%M:%S %Z"
timezone = "Europe/Paris"
}
load {
format = "%5min"
}
cpu_temperature 0 {
format = "T: %degrees °C"
path = "/sys/devices/platform/coretemp.0/temp1_input"
}
disk "/" {
format = " / %free "
}
disk "/home" {
format = " /home %free "
}
Access Private Repositories from Your Dockerfile Without Leaving Behind Your SSH Keys · vsupalov.com
put temporary ssh key in docker to build
# this is our first build stage, it will not persist in the final image
FROM ubuntu as intermediate
# install git
RUN apt-get update
RUN apt-get install -y git
# add credentials on build
ARG SSH_PRIVATE_KEY
RUN mkdir /root/.ssh/
RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa
# make sure your domain is accepted
RUN touch /root/.ssh/known_hosts
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
RUN git clone git@bitbucket.org:your-user/your-repo.git
FROM ubuntu
# copy the repository form the previous image
COPY --from=intermediate /your-repo /srv/your-repo
# ... actually use the repo :)
The SSH_PRIVATE_KEY is passed when issuing the build command with --build-arg or in the build block of your docker-compose.yml file. As it is not used in the final image, the value will not be available using the history command. For a better overview of using variables when handling your Docker workflows, read this in-depth guide.