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

Supercharge Local Development with Docker

Supercharge Local Development with Docker

Ngalam Backend Community

February 22, 2020
Tweet

More Decks by Ngalam Backend Community

Other Decks in Technology

Transcript

  1. I’m Reyhan Sofian Haqqi Engineering Manager @ Kata.ai Follow me:

    @reyhan_sofian https://facebook.com/reyhansofian
  2. Overview - Introduction to Vagrant - Introduction to Docker -

    Docker Architecture - Docker for Local Development
  3. Vagrant is a tool for building and managing virtual machine

    environments in a single workflow /introduction-to-vagrant it’s Vagrantfile
  4. /introduction-to-docker Containers are about isolations it’s an abstraction at the

    app layer that packages code and dependencies together
  5. Dockerfile /docker-architecture it’s a text document that contains all the

    commands a user could call on the command line to assemble an image
  6. Docker Compose lets you run all your services at once

    /docker-for-local-dev in the right order manage it via unified interface (docker-compose.yml)
  7. /docker-for-local-dev version: '3' services: <service_name_1>: build: <path_to_docker_file_of_service> command: <start_command_to_run> environment:

    - <env_var_1>=<env_val_1> - <env_var_2>=<env_val_2> ports: - '<port_inside_container>:<port_of_host_machine>' working_dir: <path_inside_the_docker_container_where_command_should_run> volumes: - <path_on_machine>:<path_inside_the_docker_container> <service_name_2>: .... .... ....
  8. References: - Docker volumes explained (https://bit.ly/39OPBQ8) - Docker for local

    dev tutorial (https://bit.ly/2wvTiMc) - Docker for local dev is probably not a great idea (https://bit.ly/3bThOqz) - How Docker on Mac works (https://bit.ly/2SFbnA4) - Fix Docker sync on Mac issue (https://bit.ly/2HEg8Dy) - Docker as development machine (https://bit.ly/2V7yBQL)