This document provides an overview of Docker for developers. It begins with an agenda that covers Docker containers, images, networking, volumes, UI tools, Dockerfiles, Docker Compose, and best practices. It then defines Docker and containers, discusses the benefits of containers over virtual machines. It covers key Docker concepts like images, containers, registries. It also discusses tools like Dockerfile, Docker Compose, Portainer, Kitematic. The document provides examples of common Docker commands and best practices for using resources efficiently and securely.
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. This is a first introduction to Docker, Dockerfile and docker-compose with relative basic commands.
***** DevOps Masters Program : https://www.edureka.co/masters-program/devops-engineer-training *****
This DevOps Docker Commands tutorial ( Docker Tutorial Blog Series: https://goo.gl/z93Ed1 ) will introduce you to the most commonly used Docker commands. The Hands-On session is performed on an Ubuntu-64 bit machine in which Docker is installed.
To learn how Docker can be used to integrate multiple DevOps tools, watch the video titled 'DevOps Tools', by clicking this link: https://goo.gl/up9iwd
Enhancing the application development process in all its phases—building, scaling, shipping, deploying
and running—plays a vital role in today’s competitive IT industry by shortening the time between writing
code and running it.
Tech Talk on Docker - Docker is a computer program that performs OS virtualization, also known as containerization.
Written in: Go
Supported OS: Linux, Windows, macOS
This technology is widely used within Atlogys as a best practice during development.
Hear out senior engineer Mr. Ram Awadh deliver this information session which also includes a demo.
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
This presentation about Docker tutorial will help you understand what is Docker, advantages of Docker, how does Docker work, components of Docker, virtual machine vs Docker, advanced concepts in Docker, basic Docker commands along with a demo. A Docker is an OS-level virtualization software that enables developers and IT administrators to create, deploy and run applications in a Docker container with all their dependencies. It is said to be a very light-weight software container and containerization platform. Docker engine or Docker is a client-server application that builds and executes using Docker components. Rapid deployment, portability, better efficiency, faster configuration, scalability, security are some of the advantages you get by using Docker.
Below topics are explained in this Docker presentation:
1. Virtual machine vs Docker
2. What is Docker?
3. Advantages of Docker
4. How does Docker work?
5. Components of Docker
6. Advanced concepts in Docker
7. Basic Docker commands
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
After completing the DevOps training course you will achieve hands-on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
This DevOps training course will be of benefit the following professional roles:
1. Software Developers
2. Technical Project Managers
3. Architects
4. Operations Support
5. Deployment engineers
6. IT managers
7. Development managers
You can learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. This is a first introduction to Docker, Dockerfile and docker-compose with relative basic commands.
***** DevOps Masters Program : https://www.edureka.co/masters-program/devops-engineer-training *****
This DevOps Docker Commands tutorial ( Docker Tutorial Blog Series: https://goo.gl/z93Ed1 ) will introduce you to the most commonly used Docker commands. The Hands-On session is performed on an Ubuntu-64 bit machine in which Docker is installed.
To learn how Docker can be used to integrate multiple DevOps tools, watch the video titled 'DevOps Tools', by clicking this link: https://goo.gl/up9iwd
Enhancing the application development process in all its phases—building, scaling, shipping, deploying
and running—plays a vital role in today’s competitive IT industry by shortening the time between writing
code and running it.
Tech Talk on Docker - Docker is a computer program that performs OS virtualization, also known as containerization.
Written in: Go
Supported OS: Linux, Windows, macOS
This technology is widely used within Atlogys as a best practice during development.
Hear out senior engineer Mr. Ram Awadh deliver this information session which also includes a demo.
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
This presentation about Docker tutorial will help you understand what is Docker, advantages of Docker, how does Docker work, components of Docker, virtual machine vs Docker, advanced concepts in Docker, basic Docker commands along with a demo. A Docker is an OS-level virtualization software that enables developers and IT administrators to create, deploy and run applications in a Docker container with all their dependencies. It is said to be a very light-weight software container and containerization platform. Docker engine or Docker is a client-server application that builds and executes using Docker components. Rapid deployment, portability, better efficiency, faster configuration, scalability, security are some of the advantages you get by using Docker.
Below topics are explained in this Docker presentation:
1. Virtual machine vs Docker
2. What is Docker?
3. Advantages of Docker
4. How does Docker work?
5. Components of Docker
6. Advanced concepts in Docker
7. Basic Docker commands
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
After completing the DevOps training course you will achieve hands-on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
This DevOps training course will be of benefit the following professional roles:
1. Software Developers
2. Technical Project Managers
3. Architects
4. Operations Support
5. Deployment engineers
6. IT managers
7. Development managers
You can learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training
An overview of Docker and Linux containers. There are three parts:
An introduction to Docker and containers
A demo that the audience can try out
An overview of the various vendors and groups in this space
The demo is meant to be a simple, step-by-step recipe that introduces the basic commands and ends by spinning up a node.js app using two linked containers: node and redis.
The final section explores the companies and groups that are working on containers, either complementing Docker's contributions or in direct competition with them.
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...Yogesh Wadile
The Docker daemon is a service that runs on your host operating system. It currently only runs on Linux because it depends on a number of Linux kernel features, but there are a few ways to run Docker on MacOS and Windows too. TheDocker daemon itself exposes a REST API.
Docker container is an open source software development platform. Its main benefit is to package applications in “containers,” allowing them to be portable among any system running the Linux operating system (OS).
Docker Hub is a cloud-based registry service which allows you to link to code repositories, build your images and test them, stores manually pushed images, and links to Docker Cloud so you can deploy images to your hosts.
Docker introduction.
References : The Docker Book : Containerization is the new virtualization
http://www.amazon.in/Docker-Book-Containerization-new-virtualization-ebook/dp/B00LRROTI4/ref=sr_1_1?ie=UTF8&qid=1422003961&sr=8-1&keywords=docker+book
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...Edureka!
This DevOps Docker Tutorial on what is docker ( Docker Tutorial Blog Series: https://goo.gl/32kupf ) will help you understand how to use Docker Hub, Docker Images, Docker Container & Docker Compose. This tutorial explains Docker's working Architecture and Docker Engine in detail. This Docker tutorial also includes a Hands-On session around Docker by the end of which you will learn to pull a centos Docker Image and spin your own Docker Container. You will also see how to launch multiple docker containers using Docker Compose. Finally, it will also tell you the role Docker plays in the DevOps life-cycle.
The Hands-On session is performed on an Ubuntu-64bit machine in which Docker is installed.
This presentation by Andrew Aslinger discusses best practices and pitfalls of integrating Docker into Continuous Delivery Pipelines. Learn how Andrew and his team used Docker to replace Chef to simplify their development and migration processes.
An overview of Docker and Linux containers. There are three parts:
An introduction to Docker and containers
A demo that the audience can try out
An overview of the various vendors and groups in this space
The demo is meant to be a simple, step-by-step recipe that introduces the basic commands and ends by spinning up a node.js app using two linked containers: node and redis.
The final section explores the companies and groups that are working on containers, either complementing Docker's contributions or in direct competition with them.
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...Yogesh Wadile
The Docker daemon is a service that runs on your host operating system. It currently only runs on Linux because it depends on a number of Linux kernel features, but there are a few ways to run Docker on MacOS and Windows too. TheDocker daemon itself exposes a REST API.
Docker container is an open source software development platform. Its main benefit is to package applications in “containers,” allowing them to be portable among any system running the Linux operating system (OS).
Docker Hub is a cloud-based registry service which allows you to link to code repositories, build your images and test them, stores manually pushed images, and links to Docker Cloud so you can deploy images to your hosts.
Docker introduction.
References : The Docker Book : Containerization is the new virtualization
http://www.amazon.in/Docker-Book-Containerization-new-virtualization-ebook/dp/B00LRROTI4/ref=sr_1_1?ie=UTF8&qid=1422003961&sr=8-1&keywords=docker+book
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...Edureka!
This DevOps Docker Tutorial on what is docker ( Docker Tutorial Blog Series: https://goo.gl/32kupf ) will help you understand how to use Docker Hub, Docker Images, Docker Container & Docker Compose. This tutorial explains Docker's working Architecture and Docker Engine in detail. This Docker tutorial also includes a Hands-On session around Docker by the end of which you will learn to pull a centos Docker Image and spin your own Docker Container. You will also see how to launch multiple docker containers using Docker Compose. Finally, it will also tell you the role Docker plays in the DevOps life-cycle.
The Hands-On session is performed on an Ubuntu-64bit machine in which Docker is installed.
This presentation by Andrew Aslinger discusses best practices and pitfalls of integrating Docker into Continuous Delivery Pipelines. Learn how Andrew and his team used Docker to replace Chef to simplify their development and migration processes.
Docker Essentials Workshop— Innovation Labs July 2020CloudHero
This presentation was the foundation of our Docker Essentials workshop hosted by CloudHero CEO & founder Andrei Manea for the Innovation Labs team on the 23rd of July 2020.
This presentation covers the following topics:
-Getting started with containers
-A bit of history about orchestration
-Introduction to services (what they are, how to create and scale them).
To find out more about this topic, check https://cloudhero.io/
Presentation on Docker and Docker Compose. Includes basic commands to get started with Docker container. This presentation was presented on 9th February, 2018
Docker for Developers talk from the San Antonio Web Dev Meetup in Aug 2023
Never used Docker? This is perfect for you!
New to Docker? You'll learn something for sure!
Links included for all slides, code, and examples
Go from no Docker experience to a fully running web app in one slide deck!
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. This is a first introduction to Docker with relative basic commands.
Meet up presentation on Continuous Integration with Docker on Amazon Web Services (AWS). The presentation covers benefits of Docker on AWS along with advanced Docker patterns and lessons learned.
Dockerizing Symfony2 application. Why Docker is so cool And what is Docker? And what are Containers? How they works? What are the ecosystem of Docker? And how to dockerize your web application (can be based on Symfony2 framework)?
Running the Oracle SOA Suite Environment in a Docker ContainerGuido Schmutz
Docker is all about making it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. Docker helps creating, moving and duplicating environments.
This presentation will give an introduction to Docker, the ideas behind containerization and explain why there is so much hype around Docker and why you should be taking notice. I will show how Docker containers can be used to setup different environments, such as SOA Suite, Service Bus, Business Activity Monitoring and Event Processing and Stream Explorer. The talk will also include various short live demos.
Setup of the Docker environment on a Node.js application. Several components are used: Docker Machine, Dockerfile, Docker Compose, libnetwork, Docker Swarm, setup of a load balancing with HAProxy / Interlock
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Orkestra
UIIN Conference, Madrid, 27-29 May 2024
James Wilson, Orkestra and Deusto Business School
Emily Wise, Lund University
Madeline Smith, The Glasgow School of Art
Have you ever wondered how search works while visiting an e-commerce site, internal website, or searching through other types of online resources? Look no further than this informative session on the ways that taxonomies help end-users navigate the internet! Hear from taxonomists and other information professionals who have first-hand experience creating and working with taxonomies that aid in navigation, search, and discovery across a range of disciplines.
0x01 - Newton's Third Law: Static vs. Dynamic AbusersOWASP Beja
f you offer a service on the web, odds are that someone will abuse it. Be it an API, a SaaS, a PaaS, or even a static website, someone somewhere will try to figure out a way to use it to their own needs. In this talk we'll compare measures that are effective against static attackers and how to battle a dynamic attacker who adapts to your counter-measures.
About the Speaker
===============
Diogo Sousa, Engineering Manager @ Canonical
An opinionated individual with an interest in cryptography and its intersection with secure software development.
This presentation by Morris Kleiner (University of Minnesota), was made during the discussion “Competition and Regulation in Professions and Occupations” held at the Working Party No. 2 on Competition and Regulation on 10 June 2024. More papers and presentations on the topic can be found out at oe.cd/crps.
This presentation was uploaded with the author’s consent.
Acorn Recovery: Restore IT infra within minutesIP ServerOne
Introducing Acorn Recovery as a Service, a simple, fast, and secure managed disaster recovery (DRaaS) by IP ServerOne. A DR solution that helps restore your IT infra within minutes.
3. Docker
Docker is the leading software container platform
Founded in 2013 as Linux developer tool
Fundamentally solves the „works on my machine” problem
Container industry inventor, leader and innovative
Transform app and infrastructure security, portability, agility and efficiency
4. One Application on One
Physical Server
Limitations
Slow development times
Huge costs
Wasted resources
Difficult to scale
Difficult to migrate
Vendor lock in
5. Hypervisior – Based
Virtualization
Benefit:
Better resource pooling
One physical machine divided into multiple virtual machines
Easier to scale
VMs in the cloud
Rapid elasticity
Pay as you go model
Limitations:
Each VM stills requires:
CPU limitations
Storage
RAM
An entire guest operating system
Full guest OS means wasted resources
Application portability not guaranteed
6. Docker
Standarized packaging for software and
dependencies
Isolate apps from each other
Share the same OS kernel
Works with all major Linux and Windows
Server
7.
8. Key Benefits of Docker Containers
Speed
No OS to boot – applications online in seconds
Portability
Less dependencies between proces layers = ability to move between infrastructure
Efficiency
Less OS overhead
Improved resource efficiency
9. WORA / PODA / CaaS
WORA = Write Once Run Anywhere {J,W,E}AR
PODA = Package Once Deploy Anywhere
CaaS = Container as a Service
10. Docker
Image
The basis of a Docker container
Container
The image when it is ‚running’
Registry
Stores, distributes and manages Docker images
Dockerfile
Commands to assemble an image
Docker Compose
Define and share multi-container definitions
11. Docker
Docker Engine
The client-server application contains Docker daemon, REST API, CLI
Docker Machine
A tool to launch Docker hosts on multiple platforms
Docker Client
Command-line interface to interact with Docker daemons
Docker Hub
Repository for Docker Images
Docker Store
A storefront for official Docker images and plugins as well as licensed products
14. docker run
docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]
-d -> detached
-t -> allocate a pseudo-tty
-i -> keep STDIN open even if not attached
--name -> container name
--rm -> delete container when it exists
-P [--publish-all] -> publish exposed ports to random ports
-p [-publish] -> publish a container’s ports to the host
15.
16. Docker Images Layers
Layers are read only
An image is a collection of files and some
meta data
Images are comprised of multiple layers
A layer is also contains software you want to
run
Each image contains a base layer
Docker uses a copy on write systems
18. Docker Sharing Layers
Images can share layers in order to speed up transfer times and optimize disk and
memory usage
Parent images that already exists on the host do not have to be downloaded
19. Docker pull / push
docker pull [OPTIONS] NAME[:TAG]
Pull an image or a repository from a registry (e.g. Docker Hub)
docker push [OPTIONS] NAME[:TAG]
Push an image or a repository from a registry (e.g. Docker Hub)
20. save / load / export / import
docker save [OPTIONS] IMAGE [IMAGE]
Save one or more images to a tar archive registry (e.g. Docker Hub)
docker load [OPTIONS] NAME[:TAG]
Load an image from a tar archive or STDIN
docker export [OPTIONS] CONTAINER
Export a container’s filesystem as a tar archive
docker import [OPTIONS]
Import the contents from a tarball to create a filesystem image
21. Docker commit
docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
-m Commit message
-p Pause container during commit
-c Apply Dockerfile instruction to the created image
docker commit -m `message` <container-id> <container-name>:<version>
28. Networking
IPAM (IP address management)
Planning, tracking and managing IP addressess within the network
IPAM has DNS and DHCP services
docker inspect -f='{{json .Containers}}’ <network>
docker inspect --format='{{.NetworkSettings.IPAddress}}’ <network>
29. Network drivers
bridge
Standalone containers that need to communicate
none
Disable all networking
host
Use the host’s networking directly (swarm services)
overlay
distributed network among multiple Docker daemon hosts
Links
Legacy container links
35. Kitematic
Visual Docker Container Management on Mac & Windows
Run containers through a simple, yet powerful graphical user interface.
https://kitematic.com/
36. Kitematic
Fast and Easy Setup
Docker Hub Integration
Seamless Experience Between CLI and GUI
Advantaged Features
Automatically map ports
Configuring volumes
Change environment variables
Streamline logs
CLI access to containers
38. Docker Desktop for Windows
Docker Desktop for Windows is the best way to get started with Docker on
Windows
https://docs.docker.com/docker-for-windows/
Auto update capability
No additional software required, e.g. Virtualbox
Windows: Hyper-V VM
Better networking and filesystem mounting/notification
Requires Windows 10 64-bit (Yosemite 10.10+)
Legacy desktop solution boundled with Docker Toolbox.
39. Docker for AWS/Azure
Amazon Web Services
Amazon CloudFormation templates
Integrated with Autoscaling, ELB, EBS
Azure
Integrated with VM Scale Sets for autoscaling, Azure Load Balancer, Azure Storage
40. Dockerfile
FROM – Docker base
FROM alpine:latest
LABEL – extra information
LABEL maintainer = ‘”Andrzej Sydor”
COPY/ADD
COPY build/app.jar /etc/app.jar
ADD http://resource/files/html.tar.gz /usr/share/nginx/
RUN – commands to install software and run scripts
RUN mkdir –p /tmp/myapp/
EXPOSE – the port and the protocol exposed in runtime
EXPOSE 80/tcp
ENTRYPOINT/CMD
USER / WORKDIR / ENV
47. Multi-stage Dockerfile
# first stage
FROM node:10 AS builder
WORKDIR /app
RUN npm install -g @angular/cli
RUN ng new my-app --routing=true --style=css --skipGit=true --minimal=true
WORKDIR /app/my-app
RUN ng build --prod
# second stage
FROM nginx
COPY --from=builder /app/my-app/dist/my-app/ /usr/share/nginx/html
48.
49. Docker Compose
Tool for defining and running multi-container Docker applications
YAML configuration (docker-compose.yml)
Features:
Multiple isolated environments on a single host
Preserve volume data when containers are created
Only recreate containers that have changed
Variables and moving a composition between environments
54. Docker Registry
Service that storing your Docker images
Open source – Apache license
Tightly control where your images are being stored
Fully own your images distribution pipeline
Integrate image storage and distribution tightly into your in-house development
Filesystem
/var/lib/registry
61. Docker – CPU/Memory
By default, a container can consume all available resources on the host machine if it
requires it
Limit CPU usage
-c / --cpu-shares=1024
--cpu-period=25000 (microseconds)
--cpu-quota=25000 (microseconds)
Limit memory usage
--memory 1024M
--memory-swap 1024M
By default, when you set --memory, docker will set the --memory-swap size twice
--kernel-swap 1024M
Java 10
63. Docker - best practices
One application per container
Only install what you need
Review who has access to your Docker hosts
Use the latest version
Use the resources
Awesome docker
https://awesome-docker.netlify.com/
https://github.com/veggiemonk/awesome-docker
65. Use Caching Effectively
FROM ubuntu
COPY . /app
RUN apt-get update
RUN apt-get -y install openjdk-8-jdk
COPY . /app
CMD [‘java’, ‘-jar’, ‘/app/target/app.jar’]
66. Single / Multi line variables
FROM alpine
ENV var1=abc
ENV var2=def
FROM alpine
ENV var1=abc
var2=def
67. Single / Multi line variables
FROM ubuntu
RUN wget tomcat.zip
RUN unzip tomcat.zip
RUN rm tomcat.zip
FROM alpine
RUN wget tomcat.zip
unzip tomat.zip
rm tomcat.zip
32 MB 21 MB
68. Tools
cAdvisor https://github.com/google/cadvisor/
Analyzes resource usage and performance characteristics of running containers
Node-exporter https://github.com/prometheus/node_exporter/
Exporter for machine metrics http://prometheus.io/
Prometheus https://prometheus.io/
Power your metrics and alerting with a leading open-source monitoring solution
Grafana https://grafana.com/
The open platform for beautiful analytics and monitoring
69. To Be Continued …
- Docker internals
cgroups
Limiting the resources that can be used by a processes
namespaces
Isolating filesystem resources
unionFS
Resource Management / Implicite sharing
70. To Be Continued …
- Docker Security
The Docker Bench Security is a script that checks for dozens of common best-
practices around deploying Docker containers in production
Docker Security Scanning
Flatten a Docker container
So it is only possible to “flatten” a Docker container, not an image. So we need to start a container from an image first. Then we can export and import the container in one line:
1
docker export <CONTAINER ID> | docker import - some-image-name:latest
Flatten a Docker container
So it is only possible to “flatten” a Docker container, not an image. So we need to start a container from an image first. Then we can export and import the container in one line:
1
docker export <CONTAINER ID> | docker import - some-image-name:latest
-volumes not being used by any container
docker volume ls -f dangling=true
docker volume prune
-volumes-from <containerId>
*removing
docker rm -v <containerId>
docker volume rm <volumeName>
volume inspect <volumeName>
docker volume create myVolume
docker run -dit
--name alpine1
-v myVolume:/volume
alpine
docker network create my-network
docker network ls
docker network inspect mysql_default
docker network prune
Docker container run … --network my-network
https://docs.docker.com/network/
Podłączenie kontenera do sieci typu bridge spowoduję, że kontenery będące w tej samej sieci będą się mogły pingować a kontenery będące w innych sieciach już nie.
Podłączenie kontenera do sieci none spowoduję, że kontener będzie miał tylko interfejs pętli zwrotnej loopback.
Podłączenie kontenera do sieci host powoduję, że będzie on współdzielił porty i adresy IP hosta.
https://docs.docker.com/network/bridge/
FROM <image>:<tag>
MAINTAINER
WORKDIR
ADD <source path or URL> <destination path> (copy the files from the source into the containers)
COPY <source path or URL> <destination path> (copy new files of directories>
As you can see, the functionality of COPY is almost the same as the ADD instruction, with one
difference. COPY supports only the basic copying of local files into the container. On the
other hand, ADD gives some more features, such as archive extraction, downloading files
through URL, and so on. Docker's best practices say that you should prefer COPY if you do
not need those additional features of ADD. The Dockerfile will be cleaner and easier to
understand thanks to the transparency of the COPY command.
RUN
CMD command parameter1 parameterN
ENTRYPOINT
EXPOSEVOLUMELABEL
ENV
USER
ARGONBUILD
[144]
Let's summarize what we have learned about the
differences and their cooperation:
A Dockerfile should specify at least one CMD or ENTRYPOINT instruction
Only the last CMD and ENTRYPOINT in a Dockerfile will be used
ENTRYPOINT should be defined when using the container as an executable
You should use the CMD instruction as a way of defining default arguments for
the command defined as ENTRYPOINT or for executing an ad-hoc command in a
container
CMD will be overridden when running the container with alternative arguments
ENTRYPOINT sets the concrete default application that is used every time a
container is created using the image
If you couple ENTRYPOINT with CMD, you can remove an executable from CMD
and just leave its arguments which will be passed to ENTRYPOINT
The best use for ENTRYPOINT is to set the image's main command, allowing that
image to be run as though it was that command (and then use CMD as the default
flags)
FROM <image>:<tag>
MAINTAINER
WORKDIR
ADD <source path or URL> <destination path> (copy the files from the source into the containers)
COPY <source path or URL> <destination path> (copy new files of directories>
As you can see, the functionality of COPY is almost the same as the ADD instruction, with one
difference. COPY supports only the basic copying of local files into the container. On the
other hand, ADD gives some more features, such as archive extraction, downloading files
through URL, and so on. Docker's best practices say that you should prefer COPY if you do
not need those additional features of ADD. The Dockerfile will be cleaner and easier to
understand thanks to the transparency of the COPY command.
RUN
CMD command parameter1 parameterN
ENTRYPOINT
EXPOSEVOLUMELABEL
ENV
USER
ARGONBUILD
[144]
Let's summarize what we have learned about the
differences and their cooperation:
A Dockerfile should specify at least one CMD or ENTRYPOINT instruction
Only the last CMD and ENTRYPOINT in a Dockerfile will be used
ENTRYPOINT should be defined when using the container as an executable
You should use the CMD instruction as a way of defining default arguments for
the command defined as ENTRYPOINT or for executing an ad-hoc command in a
container
CMD will be overridden when running the container with alternative arguments
ENTRYPOINT sets the concrete default application that is used every time a
container is created using the image
If you couple ENTRYPOINT with CMD, you can remove an executable from CMD
and just leave its arguments which will be passed to ENTRYPOINT
The best use for ENTRYPOINT is to set the image's main command, allowing that
image to be run as though it was that command (and then use CMD as the default
flags)