Coder Social home page Coder Social logo

ubclaunchpad / workshop-guide-to-docker Goto Github PK

View Code? Open in Web Editor NEW
2.0 14.0 1.0 186 KB

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

Home Page: https://www.youtube.com/watch?v=Lypf1iYiPFs

License: MIT License

HTML 17.11% CSS 9.94% JavaScript 70.94% Dockerfile 2.01%
ubc workshop docker presentation

workshop-guide-to-docker's Introduction

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!

workshop-guide-to-docker's People

Contributors

bobheadxi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yao00

workshop-guide-to-docker's Issues

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.