Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gauravgahlot/gopher
A simple task system using Docker SDK
https://github.com/gauravgahlot/gopher
Last synced: about 1 month ago
JSON representation
A simple task system using Docker SDK
- Host: GitHub
- URL: https://github.com/gauravgahlot/gopher
- Owner: gauravgahlot
- License: apache-2.0
- Created: 2022-05-23T06:46:04.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-26T06:36:29.000Z (over 2 years ago)
- Last Synced: 2024-06-21T17:02:42.290Z (5 months ago)
- Language: Go
- Size: 17.6 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gopher
A simple task system using Docker SDK
## Getting Started
### Pre-requisite
- Go (Tested with 1.15.15)
### Step 1. Clone the repository
```
git clone https://github.com/gauravgahlot/gopher
```### 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.yaml4 directories, 9 files
```### Step 2. Building Go binaries
```
cd gopher
go build
```This command builds a gopher binary as shown in the project tree structure:
#### Project Directory Structure:
```
$ tree
.
├── LICENSE
├── README.md
├── go.mod
├── go.sum
├── gopher
├── internal
│ ├── container-manager
│ │ └── container_manager.go
│ ├── task-runner
│ │ └── runner.go
│ └── types
│ └── task.go
├── main.go
└── task.yaml4 directories, 10 files
```### Step 3. Compiling and running 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
```Run `docker ps -a` to see what all containers ran and exit:
```
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
08f08e39cab9 busybox "echo 'Hello, Gopher…" 13 minutes ago Exited (0) 13 minutes ago hello-gopher
```