Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #curl https://pastebin.com/raw/xYGzrccq | sed 's/\r//g' > VAdocker4all.txt
- ##################################################################################
- ##################################################################################
- ## DOCKER ########################################################################
- ##################################################################################
- ##################################################################################
- #https://docs.docker.com/machine/drivers/virtualbox/
- systemctl enable docker
- systemctl start docker
- usermod -aG docker guest
- #http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
- cat << 'EOF' > test.S
- #include <sys/syscall.h>
- .text
- .globl _start
- .type _start, @function
- _start:
- movq $SYS_exit, %rax
- movq $0, %rdi
- syscall
- EOF
- gcc -nostdlib test.S && { ./a.out; echo $?; }
- [ ! -d hello ] && mkdir hello
- cd hello
- wget https://raw.githubusercontent.com/docker-library/hello-world/master/hello.c
- gcc -static -nostartfiles hello.c -o hello && { ./a.out; echo $?; }
- cat << 'EOF' > Dockerfile
- FROM scratch
- COPY hello /
- CMD ["/hello"]
- EOF
- docker build --rm -t dockhello .
- docker run --rm=true -v /sys/fs/cgroup:/sys/fs/cgroup:ro dockhello
- cd ..
- [ ! -d witaj ] && mkdir witaj
- cd witaj
- #http://blog.bjdean.id.au/2015/08/docker-from-scratch/
- curl http://ix.io/pOz | sed 's/\r//g' > witaj.c
- echo -e "witaj: witaj.c" > makefile
- echo -e "\t gcc -static -o witaj witaj.c" >> makefile
- echo -e "docker: witaj" >> makefile
- echo -e "\t docker build --rm -t dockwitaj ." >> makefile
- cat << 'EOF' > Dockerfile
- FROM scratch
- COPY witaj /
- CMD ["/witaj"]
- EOF
- #gcc -static witaj.c -o witaj
- #docker build --rm -t dockwitaj .
- make docker
- #docker run --rm=true dockwitaj
- #/etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="quiet systemd.legacy_systemd_cgroup_controller=yes"
- docker run --rm=true -v /sys/fs/cgroup:/sys/fs/cgroup:ro dockwitaj
- docker run --rm=true -v /sys/fs/cgroup:/sys/fs/cgroup:ro --env="BJDTEST=i żegna!" dockwitaj
- cd ..
- #https://www.iron.io/microcontainers-tiny-portable-containers/
- #https://github.com/rocker-org/rocker
- docker run --rm=true -ti rocker/r-base
- #https://github.com/pwasiewi/docker-freeciv
- docker run --rm -it openjdk:8
- docker run -it ubuntu:zesty /bin/bash
- docker rm -f `docker ps -aq` #usuń wszystkie docker kontenery
- docker run -d -v /freeciv:/freeciv -p 5556:5556 42n4/freeciv /freeciv/save.bz2
- docker ps -a
- docker exec -it objective_boyd /bin/bash
- #https://github.com/pwasiewi/docker-freeciv-client
- xhost +
- docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix 42n4/freeciv-client
- #https://github.com/freeciv/freeciv-web
- #http://blog.xebia.com/create-the-smallest-possible-docker-container/
- #https://www.linux.com/learn/how-use-docker-machine-create-swarm-cluster
- #https://opsnotice.xyz/how-to-monitor-docker-hosts/
- #https://docs.docker.com/engine/tutorials/dockervolumes/#backup-restore-or-migrate-data-volumes
- #docker run -d --name='low_prio' --cpu-shares=250" --cpuset-cpus=0" busybox md5sum /dev/urandom
- #docker create -t -i fedora bash
- #docker start -a -i 6d8af538ec5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement