KEMBAR78
How to Dockerize Angular, Vue and React Web Apps | PPTX
How to Dockerize Angular, Vue
and React Web Apps
#DockerDevBSF
WEBINAR
Panelists
Orlando Castillo
Technical Consultant
Charles Green
Director of Thought Leadership
#DockerDevBSF
How can you simplify multiple stages?
Server
Microservice
Microservic
e
How do you deploy using cli at its highest?
#DockerDevBSF
Has Docker got you covered?
#DockerDevBSF
Uglifying
AOT compiler
Tree shaking
The beauty of ng build
#DockerDevBSF
#DockerDevBSF
Isolated running process
Unlink virtual machines, share the operating system
on which they are running
Simplify building, shipping apps
Runs natively on Linux or Windows Server
Runs on Windows or Mac Development machines
(Docker CE)
What is a Docker
container?
#DockerDevBSF
#DockerDevBSF
Docker Image
Example: nginx Alpine with
Angular application code
Docker Container
Created by using an image. Runs your
application in a container.
The Role of Images and Containers
docker run
#DockerDevBSF
A read-only template composed of layered
filesystems used to share common files and create
Docker container instances.
Image
#DockerDevBSF
An isolated and secured shipping container created
from an image that can be run, started, stopped,
moved and deleted.
Container
#DockerDevBSF
Demo Time
Deploying Angular
#DockerDevBSF
Docker Image
Dockerfile
What do we need?
Artifacts
Dockerfile
Docker Image
Docker Container
http://orlando1409.myawesomesite.com/
The Linux kernel on steroids
Docker Layers
#DockerDevBSF
Using Docker Multistage-Stage Builds
With that, you can have a
Node.js base image that
installs, builds and compiles
everything, and then, “discard”
all those Node.js specific
Docker image layers, and end
up with a Nginx image with
just your compiled code.
Docker Image
docker build
Dockerfile
Dockerfile and Images
LABEL author="Orlando
Castillo"COPY ./dist
/usr/share/nginx/html
ENTRYPOINT ["nginx", "-g", "daemon off;"]
FROM nginx:alpine
EXPOSE 80 443
Dockerfile Example
#DockerDevBSF
docker build -t orlando1409/to-do-app .
Short for --tag
Tag name
Build context
Building a Custom Image
Repository Image name
#DockerDevBSF
docker run -p 8080:80 orlando1409/to-do-app
External/Internal
Port
Image Name
Running a Custom Container
#DockerDevBSF
Thank you!
#DockerDevBSF
Bonus material
#DockerDevBSF
Q&A
#DockerDevBSF

How to Dockerize Angular, Vue and React Web Apps