Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Awesome Docker | 24,728 | 3 days ago | apache-2.0 | |||||||
:whale: A curated list of Docker resources and projects | ||||||||||
Labs | 11,145 | 21 days ago | 137 | apache-2.0 | PHP | |||||
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome. | ||||||||||
Cmake Examples | 10,072 | a month ago | 29 | mit | CMake | |||||
Useful CMake Examples | ||||||||||
Devops Guide | 6,318 | 25 days ago | 5 | mit | HTML | |||||
DevOps Guide - Development to Production all configurations with basic notes to debug efficiently. | ||||||||||
Deeplearningproject | 4,043 | 3 years ago | 3 | mit | HTML | |||||
An in-depth machine learning tutorial introducing readers to a whole machine learning pipeline from scratch. | ||||||||||
Dockerlabs | 3,366 | 8 days ago | 43 | apache-2.0 | PHP | |||||
Docker - Beginners | Intermediate | Advanced | ||||||||||
Getting Started | 2,568 | 5 days ago | 1 | August 14, 2022 | 47 | apache-2.0 | JavaScript | |||
Getting started with Docker | ||||||||||
K8s Tutorials | 2,519 | 19 days ago | 1 | mit | Go | |||||
k8s tutorials | k8s 教程 | ||||||||||
Fastapi Realworld Example App | 2,083 | 7 months ago | mit | Python | ||||||
Backend logic implementation for https://github.com/gothinkster/realworld with awesome FastAPI | ||||||||||
Infrastructure As Code Tutorial | 2,065 | 4 months ago | 11 | apache-2.0 | ||||||
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes |
A template project to create a Docker image for a Go application. The example application exposes an HTTP endpoint.
Java developer? Check out miguno/java-docker-build-tutorial
Features:
Docker must be installed on your local machine. That's it. You do not need to have Go installed.
Step 1: Create the Docker image according to Dockerfile. This step builds, tests, and packages the Go application. The resulting image is 5MB in size.
# ***Creating an image may take a few minutes!***
$ docker build --build-arg PROJECT_VERSION=1.0.0-alpha -t miguno/golang-docker-build-tutorial:latest .
# You can also build with the new BuildKit.
# https://docs.docker.com/build/
$ docker buildx build --build-arg PROJECT_VERSION=1.0.0-alpha -t miguno/golang-docker-build-tutorial:latest .
Optionally, you can check the size of the generated Docker image:
$ docker images miguno/golang-docker-build-tutorial
REPOSITORY TAG IMAGE ID CREATED SIZE
miguno/golang-docker-build-tutorial latest 2de05b854c1b 11 minutes ago 4.78MB
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 of the running container.
$ curl http://localhost:8123/status
{"status": "idle"}
If you have just installed, you can run the commands above more conveniently:
$ just
Available recipes:
audit # detect known vulnerabilities (requires https://github.com/sonatype-nexus-community/nancy)
build # build executable for local OS
coverage # show test coverage
default # print available targets
deps # show dependencies
docker-image-create # create a docker image (requires Docker)
docker-image-run # run the docker image (requires Docker)
docker-image-size # size of the docker image (requires Docker)
evaluate # evaluate and print all just variables
explain lint-identifier # explain lint identifier (e.g., "SA1006")
format # format source code
lint # run linters (requires https://github.com/dominikh/go-tools)
outdated # detect outdated modules (requires https://github.com/psampaz/go-mod-outdated)
release # build release executables for all supported platforms
run # run executable for local OS
send-request-to-app # send request to the app's HTTP endpoint (requires running container)
system-info # print system information such as OS and architecture
test *FLAGS # run tests with colorized output (requires https://github.com/kyoh86/richgo)
test-vanilla *FLAGS # run tests (vanilla), used for CI workflow
tidy # add missing module requirements for imported packages, removes requirements that aren't used anymore
vulnerabilities # detect known vulnerabilities (requires https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck)
Example:
$ just docker-image-create
You can run the Go application locally if you have Go installed. See justfile for additional commands and options.
# Build
$ go build -trimpath -ldflags="-w -s" -v -o app cmd/golang-docker-build-tutorial/main.go
# Test
$ go test -cover -v ./...
# Run
$ ./app