All Projects → miguno → Golang Docker Build Tutorial

miguno / Golang Docker Build Tutorial

Licence: apache-2.0
A template project to create a minimal Docker image for a Go application

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Golang Docker Build Tutorial

Flutter For Android Developers
Compilation of Flutter materials for Android developers
Stars: ✭ 488 (+1255.56%)
Mutual labels:  tutorial, example
Vulkan minimal compute
Minimal Example of Using Vulkan for Compute Operations. Only ~400LOC.
Stars: ✭ 603 (+1575%)
Mutual labels:  tutorial, example
React From Zero
A simple (99% ES2015 less) tutorial for React
Stars: ✭ 4,638 (+12783.33%)
Mutual labels:  tutorial, example
Please Contain Yourself
A Docker tutorial written for people who don't actually know Docker already.
Stars: ✭ 385 (+969.44%)
Mutual labels:  tutorial, container
Ionic3 Angular43 Httpclient
Example of Ionic 3 and the new Angular 4.3 HTTPClient
Stars: ✭ 20 (-44.44%)
Mutual labels:  tutorial, example
Firebase Instagram
📸 Instagram clone with Firebase Cloud Firestore, Expo, and React Native 😁😍
Stars: ✭ 389 (+980.56%)
Mutual labels:  tutorial, example
Emacs Elisp Programming
Tutorial about programming Elisp and Emacs text editor customization.
Stars: ✭ 548 (+1422.22%)
Mutual labels:  tutorial, example
Javascript Idiosyncrasies
A bunch of Javascript idiosyncrasies to beginners.
Stars: ✭ 353 (+880.56%)
Mutual labels:  tutorial, example
React Redux Boilerplate Example
Stars: ✭ 15 (-58.33%)
Mutual labels:  tutorial, example
Haxejs
Documentation about using JavaScript with Haxe
Stars: ✭ 25 (-30.56%)
Mutual labels:  tutorial, example
Go Todo Rest Api Example
📚 A RESTful API example for simple todo application with Go
Stars: ✭ 385 (+969.44%)
Mutual labels:  tutorial, example
Generals.io Node.js Bot Example
An example Node.js bot for generals.io. Learn more at http://dev.generals.io/api#tutorial
Stars: ✭ 28 (-22.22%)
Mutual labels:  tutorial, example
Learning Rust
Rust 学习之路 > Rust Programming Tutorial, include articles, interview, example, problems.
Stars: ✭ 376 (+944.44%)
Mutual labels:  tutorial, example
Espressif
all espressif stuff will committed here
Stars: ✭ 477 (+1225%)
Mutual labels:  tutorial, example
Pygame tutorials
Code to go along with lessons at http://kidscancode.org/lessons
Stars: ✭ 363 (+908.33%)
Mutual labels:  tutorial, example
Rxjava2 Android Samples
RxJava 2 Android Examples - Migration From RxJava 1 to RxJava 2 - How to use RxJava 2 in Android
Stars: ✭ 4,950 (+13650%)
Mutual labels:  tutorial, example
Avenging
MVP pattern example on Android: no Dagger or RxJava example
Stars: ✭ 279 (+675%)
Mutual labels:  tutorial, example
Javascript Journey
Source code for blog post Journey from procedural to reactive JavaScript with stops
Stars: ✭ 309 (+758.33%)
Mutual labels:  tutorial, example
Algolia Swift Demo
iOS instant search tutorial
Stars: ✭ 23 (-36.11%)
Mutual labels:  tutorial, example
Pwa Example
A short example illustrating some essential steps for creating a progressive web app (PWA).
Stars: ✭ 28 (-22.22%)
Mutual labels:  tutorial, example

Tutorial: Create a Docker image for a Go application

Build Status License

A template project to create a Docker image for a Go application. The example application exposes an HTTP endpoint.

The Docker build uses a multi-stage build setup to minimize the size of the generated Docker image. The Go build uses dep for dependency management.

Java developer? Check out https://github.com/miguno/java-docker-build-tutorial

Requirements

Docker must be installed. That's it. You do not need to have Go installed.

Usage and Demo

Step 1: Create the Docker image according to Dockerfile. This step uses Maven to build, test, and package the Go application. The resulting image is 7MB in size.

# This may take a few minutes.
$ docker build -t miguno/golang-docker-build-tutorial:latest .

Step 2: Start a container for the Docker image.

$ docker run -p 8123:8123 miguno/golang-docker-build-tutorial:latest

Step 3: Open another terminal and access the example API endpoint.

$ curl http://localhost:8123/status
{"status": "idle"}

Notes

You can run the Go application locally if you have Go installed.

# Build and run the application
$ go run app.go
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].