Skip to content

dockersamples/gopher-task-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management application using Go

A simple task system using Go Docker SDK.

Prerequisites

  • Go (tested with 1.17.2)
  • Docker

Steps to Run

  • Clone the repository
git clone https://github.com/dockersamples/gopher-task-system.git
  • Project directory structure
$ tree
.
├── LICENSE
├── README.md
├── go.mod
├── go.sum
├── internal
│   ├── container-manager
│   │   └── container_manager.go
│   ├── task-runner
│   │   └── runner.go
│   └── types
│       └── task.go
├── main.go
└── task.yaml

4 directories, 9 files
  • Build the task system
go build -o gopher
  • Run tasks
$ ./gopher run task.yaml

preparing task -  gopher-loops
preparing task -  hello-gopher
starting task -  gopher-loops
starting task -  hello-gopher
completed task -  hello-gopher
completed task -  gopher-loops

Docker Desktop

  • Run docker ps -a to see what all task containers
$ docker ps -a
CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS                     PORTS     NAMES
396e25d3cea8   busybox   "sh -c 'for i in `se…"   6 minutes ago   Exited (0) 6 minutes ago             gopher-loops
aba428b48a0c   busybox   "echo 'Hello, Gopher…"   6 minutes ago   Exited (0) 6 minutes ago             hello-gopher

Sequence Diagram

Sequence Diagram

About

A Task System using Go Docker SDK.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages