Git Product home page Git Product logo

learn-docker's Introduction

Docker

Introduction

Purpose

Make a simple project with docker and help to learn the basics.

Objective

This project will make 2 containers: 1 app & 1 datastore(redis). The app will get data from redis and show it in the response. For redis image, we can download it from the official docker registry, but for app image, we will make it by ourself. The language to make the app is Golang aka Go.

You can use another language than Go, but this project will focus on using Go.

Author Setup

  • OS: Ubuntu 16.04.6 LTS
  • Docker: Docker version 18.09.7, build 2d0083d (Docker Engine - Community)
  • Docker-Compose: docker-compose version 1.24.1, build 4667896b
  • Docker-Machine: docker-machine version 0.16.0, build 702c267f
  • Golang: go version go1.13 linux/amd64

Docker Images

It's a common pratice to not use latest tag

Prerequisite

Usually docker need to be super user, so try to sudo su - first.

FAQ
Q: Why we need to install go to our device if we can pull go image to our docker ?
A: The reason is for comparison version. So in docker, we're using go1.11 but in local we're using another version. Also having install go in your device make a guarantee that you understand how to manage GOPATH and GOROOT, we need it to undestand for dockerfile.

Walkthrough

You can follow from this docs
If you don't see root@verlandz in sample cmd, that's mean it's not running on the root

learn-docker's People

Contributors

verlandz avatar

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.