Coder Social home page Coder Social logo

itay47 / devops-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from levops-cloud/devops-docker

0.0 1.0 0.0 130.99 MB

docker supplementary for devops course

Dockerfile 6.31% Python 3.12% C# 44.25% HTML 10.98% CSS 12.58% JavaScript 8.54% Shell 0.73% Objective-J 0.80% Java 12.68%

devops-docker's Introduction

Docker

Part 1: Docker Basic

Some basic command

docker info
docker ps
docker images

Docker run command:

docker run alpine echo "Hello World"
docker run -i -t -d --name nicedocker -p 8080:80 alpine ash
docker run -h niceDocker -i -t --rm debian /bin/bash
docker run --help

Docker Volumes:

docker run -dti --name alpine1 --mount target=/app alpine ash
docker inspect alpine1
docker stop alpine1 && docker rm alpine1

Docker Volumes Demo:

docker volume create fs_shared
docker volume ls
docker run --rm -tdi --name alpine1 --mount source=fs_shared,target=/app alpine ash
docker run --rm -tdi --name alpine2 --mount source=fs_shared,target=/app alpine ash
docker run --rm -tdi --name alpine3 --mount source=fs_shared,target=/app alpine ash

Docker BIND mounts:

docker run --rm -tdi -v "$(pwd)"/source:/app alpine ash
docker run --rm -tdi --mount type=bind,source="$(pwd)"/source,target=/app alpine ash

Running BootStrap app in a container - Lab

docker run --rm -tdi --mount type=bind,source="$(pwd)"/source,target=/app levep79/alpine-oraclejre8 java -jar -Dspring.profiles.active /app/spring-music.jar

docker run --rm -tdi -p 8082:8080 --mount type=bind,source="$(pwd)"/source,target=/app levep79/alpine-oraclejre8 java -jar -Dspring.profiles.active /app/spring-music.jar

Networking - Lab

docker network ls
docker run --rm -tdi --name alpine1 alpine ash
docker run --rm -tdi --name alpine2 alpine ash
docker network create dmz
docker network inspect dmz
docker run -tdi --rm --name network_test --network dmz alpine ash
docker inspect network_test
docker network alpine-net 
docker run -tdi --rm --name alpine1 --network alpine-net alpine ash
docker run -tdi --rm --name alpine2 --network alpine-net alpine ash
docker run -tdi --rm --name alpine3  alpine ash
docker run -tdi --rm --name alpine4 --network alpine-net alpine ash
docker network connect dmz alpine4

devops-docker's People

Contributors

levops-cloud avatar itay47 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.