Docker is a relatively new technology, but it is based on solid underpinnings of the Linux Kernel. It can provision instances in a fraction of the time versus a traditional virtual machine. This makes it a great candidate for development teams to create consistent test benches for their developers. To set up your own disposable Docker environments bring a laptop and make your development a pleasurable experience.
2. About Me
Harold Dost (@hdost)
7+ years of Oracle Middleware
experience
OCE (SOA Foundation Practitioner)
Oracle ACE Associate
From Michigan
blog.raastech.com
CC BY 3.0 US, Harold A. Dost III 2
3. About Raastech
» Small systems integrator founded in 2009
» Headquartered in the Washington DC area
» Specializes in Oracle Fusion Middleware
» Oracle Platinum Partner & Reseller
» Oracle SOA Specialized – 1 in 1,500 worldwide
» Oracle Platinum Partner – 1 in 3,000 worldwide
CC BY 3.0 US, Harold A. Dost III 3
6. Tools
» Docker Machine
» Docker Engine
» Docker Compose
» Docker Registry
CC BY 3.0 US, Harold A. Dost III 6
7. Docker Machine
» This aids in creating docker hosts
» The target of these can be:
» Cloud Providers
» AWS
» Digital Ocean
» Google Cloud Platform
» Microsoft Azure and Hyper-V
CC BY 3.0 US, Harold A. Dost III 7
8. Docker Machine cont.
» Other VM Targets
» OpenStack
» Oracle VirtualBox
» VMware Fusion®
» vCloud® Air™
» vSphere®
CC BY 3.0 US, Harold A. Dost III 8
9. Docker Machine
Creates a dummy machine
docker-machine create --driver virtualbox default
CC BY 3.0 US, Harold A. Dost III 9
10. Docker Engine
» The basis of the whole docker eco system
» Responsible for handling all interactions between the
containers and the base operating system
CC BY 3.0 US, Harold A. Dost III 10
11. Using Docker Engine
» 39 Different commands
» Only covering some of the most used
CC BY 3.0 US, Harold A. Dost III 11
12. Commands: Retrieve
pull - Pull an image or a repository from a registry
CC BY 3.0 US, Harold A. Dost III 12
13. Commands: Create and Delete
create - Create a new container
rm - Remove one or more containers
rmi - Remove one or more images
CC BY 3.0 US, Harold A. Dost III 13
14. Commands: Start and Stop
start - Start 1+ stopped containers
stop - Stop a running container
exec - Run command in running container
run - Run command in new container
kill - Kill a running container
restart - Restart a running container
CC BY 3.0 US, Harold A. Dost III 14
15. Commands: Organize
rename - Rename a container
tag - Tag an image into a repository
commit - Create a new image from a container's changes
CC BY 3.0 US, Harold A. Dost III 15
16. Commands: Etc.
cp - Copy files to and from containers
port - List port mappings
ps - List containers
attach - Attach to a running container
CC BY 3.0 US, Harold A. Dost III 16
17. Dockerfile 1
FROM java:8
RUN apt-get update
RUN apt-get install -y maven nodejs
EXPOSE 9000
WORKDIR /app
COPY app /app
RUN chown -R appuser /app
USER appuser
ENTRYPOINT mvn spring-boot:run
1
For more information about file arguments check here.
CC BY 3.0 US, Harold A. Dost III 17
18. Docker Compose
» Create Multi-container Applications
» Example:
» Java App
» Database
CC BY 3.0 US, Harold A. Dost III 18
19. Docker Compose
» Uses decriptor file compose.yml
» Brings up an application
CC BY 3.0 US, Harold A. Dost III 19
20. Docker Compose Commands
build - Build or rebuild services
kill - Kill containers
up - Create and start containers
migrate-to-labels - Recreate containers to add labels
version - Show the Docker-Compose version information
CC BY 3.0 US, Harold A. Dost III 20
21. The docker-compose.yml 1
web:
build: .
links:
- db
ports:
- "8000:8000"
db:
image: postgres
1
For more information about file arguments check here.
CC BY 3.0 US, Harold A. Dost III 21