This file contains hidden or 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
mkfifo /tmp/stdout /tmp/stderr | |
chmod 0666 /tmp/stdout /tmp/stderr | |
# Have the main Docker process tail the files to produce stdout and stderr | |
# for the main process that Docker will actually show in docker logs. | |
tail -f /tmp/stdout & | |
tail -f /tmp/stderr >&2 & |
This file contains hidden or 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
mkdir ~/.npm | |
npm config set prefix ~/.npm | |
nano ~/.bashrc | |
export PATH="$PATH:$HOME/.npm/bin" | |
source ~/.bashrc |
This file contains hidden or 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
ssh root@MachineB 'bash -s' < local_script.sh |
This file contains hidden or 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 | |
EXPECTED_NUM_ARGS=1; | |
if [ "$#" -ne $EXPECTED_NUM_ARGS ]; then | |
# user didn't specify which container ID, assume the latest one | |
CONTAINER_ID=`/usr/bin/docker ps -q --no-trunc | /bin/sed -n 1p` | |
/usr/bin/docker exec -it $CONTAINER_ID bash | |
else | |
# enter the container the user specified |
This file contains hidden or 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
- If you have an special character (accent ?) in your path, Fig crash with "fig UnicodeDecodeError: 'ascii'" |
This file contains hidden or 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
docker run --name=steam \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/shm:/dev/shm \ | |
-v /run/user/${UID}/pulse:/run/user/${UID}/pulse \ | |
-v /etc/machine-id:/etc/machine-id \ | |
-v ${HOME}/Downloads:/tmp/Downloads \ | |
-e DISPLAY=${DISPLAY} tianon/steam |
This file contains hidden or 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
================================================= | |
After software installation | |
================================================= | |
RUN apt-get clean | |
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
================================================= | |
Docker on build process, include all files on directory build (include .git with old build) | |
Solution for reduce size of docker image (but for reuse is not good solution) | |
================================================= |
This file contains hidden or 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
xhost + | |
docker run -Pti -e DISPLAY=$DISPLAY.0 -v /tmp/.X11-unix:/tmp/.X11-unix --net=host --name androidstudio nikowoot/android-studio | |
docker run -Pti -e DISPLAY=$DISPLAY.0 -v /tmp/.X11-unix:/tmp/.X11-unix --net=host --name phpstorm nikowoot/phpstorm |
This file contains hidden or 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 | |
# FIXME : Lancement via la commande sudo, lance virtualbox en tant que Root (donc ne pas marche pas) | |
# FIXME : sudo X, bug parfois et plante le terminal (fonctionne avec un sudo avant) | |
sudo X :3 -ac -terminate & # Lance sur un nouveau serveur X affichage 3 | |
sleep 2 # Attend 2 secondes que le serveur soit prêt | |
DISPLAY=:3 virtualbox --startvm $1 --fullscreen # Lance l'application dans une autre Xsession |