Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker?! But I'm a frontend.

Docker?! But I'm a frontend.

Shipping and developing applications in different environments are hard and we became masters of workarounds. Docker makes our lives easier by shipping and running consistently the same container in every environment.

Michael Lancaster

September 25, 2017
Tweet

More Decks by Michael Lancaster

Other Decks in Technology

Transcript

  1. Hypervisor Hardware App A Bins/Libs Guest OS App B Bins/Libs

    Guest OS App C Bins/Libs Guest OS VM Virtual Machines
  2. Container (writable, running application) Layered image 2 (read-only) Layered image

    1 (read-only) Platform image (runtime environment, read-only) Image layers
  3. Dockerfile: FROM nginx COPY build /usr/share/nginx/html $ docker build -t

    static-web . $ docker run -p 8080:80 --name static -d static-web Build image: Run container:
  4. $ docker-compose -f docker-compose.yml up -d CLI: version: “3” services:

    static: container_name: frontinbh_static build: . ports: - "8080:80" server: image: mhart/alpine-node:latest working_dir: /usr/src/app container_name: frontinbh_server volumes: - ./server:/usr/src/app ports: - "3000:3000" command: npm start docker-compose.yml:
  5. Tag image: $ docker tag frontinbh_static weblancaster/frontinbh_static $ docker login

    $ docker push weblancaster/frontinbh_static Registry login (Dockerhub default): Push image: