mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-23 21:32:41 +08:00
Feature/docker4build (#192)
* Help developers with docker-compose configuration * unrequire Buillderfile * GOOS and GOARCH from environment
This commit is contained in:
parent
9ec7728d08
commit
ac2132b9c6
11
README.md
11
README.md
@ -445,6 +445,17 @@ go get -v github.com/kovetskiy/mark
|
||||
$ docker run --rm -i kovetskiy/mark:latest mark <params>
|
||||
```
|
||||
|
||||
### Compile and install using docker-compose
|
||||
|
||||
Mostly useful when you intend to enhance `mark`.
|
||||
|
||||
```bash
|
||||
# Create the binary
|
||||
$ docker-compose run markbuilder
|
||||
# "install" the binary
|
||||
$ cp mark /usr/local/bin
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
|
41
docker-compose.yaml
Normal file
41
docker-compose.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
version: "3.5"
|
||||
services:
|
||||
|
||||
markbuilder:
|
||||
image: golang:latest
|
||||
environment:
|
||||
# Set them in your environment or .env
|
||||
- GOOS=${GOOS?Missing GOOS.}
|
||||
- GOARCH=${GOARCH?Missing GOARCH.}
|
||||
# Example Values
|
||||
# MacOS 64-bit
|
||||
# - GOOS=darwin
|
||||
# - GOARCH=amd64
|
||||
|
||||
# MacOS 32-bit
|
||||
# - GOOS=darwin
|
||||
# - GOARCH=386
|
||||
|
||||
# Linux 64-bit
|
||||
# - GOOS=linux
|
||||
# - GOARCH=amd64
|
||||
|
||||
# Linux 32-bit
|
||||
# - GOOS=linux
|
||||
# - GOARCH=386
|
||||
|
||||
# Windows 64-bit
|
||||
# - GOOS=windows
|
||||
# - GOARCH=amd64
|
||||
|
||||
# Windows 32-bit
|
||||
# - GOOS=windows
|
||||
# - GOARCH=386
|
||||
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./
|
||||
target: /go/src/github.com/kovetskiy/mark
|
||||
|
||||
working_dir: /go/src/github.com/kovetskiy/mark/
|
||||
command: make build
|
Loading…
x
Reference in New Issue
Block a user