Skip to content

🎃 Materials for UBC Launch Pad's "A Developer's Guide to Docker" workshop

License

Notifications You must be signed in to change notification settings

ubclaunchpad/workshop-guide-to-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

Docker is a containerization system that keeps your application’s running environment safe, simple, and consistent on all platforms, making development and deployment a breeze. This repo contains the workshop component of the presentation, where we walk through how to set up Docker configurations for development and distribution.

This project was bootstrapped with Create React App.

Workshop Tasks

To get started, clone this repository by running the following commands in a directory of your choice:

git clone https://github.com/ubclaunchpad/workshop-guide-to-docker.git
cd workshop-guide-to-docker

Have a look at the example Dockerfile provided (demo.Dockerfile). You can build an image from it with the following command:

docker build -f demo.Dockerfile -t my-app .

Then, create a container using the image you built and run it:

docker run --rm -it -p 8000:8000 my-app

You can then browse the directory contents of your image by visiting the site at the exposed port: http://localhost:8000/

Part 1: Docker for Development

  • start with an image that has Node.js

  • add an “entrypoint” command to install dependencies and run the website inside a Docker container

  • leverage volume mounting to allow code changes to be reflected instantly in a container

See the slides for more details!

Part 2: Docker for Distribution

The Docker for Development configuration is not good for distribution. Instead:

  • build a lightweight image optimized for distribution

  • run the container to serve the website

  • upload to Docker Hub so anyone can download and deploy your image (optional!)

See the slides for more details!

About

🎃 Materials for UBC Launch Pad's "A Developer's Guide to Docker" workshop

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published