Commit graph

10 commits

Author SHA1 Message Date
Quentin McGaw
a01f704d61 Added volume to Dockerfile so bind mounting is optional 2019-07-06 14:56:06 +02:00
Quentin McGaw
e637497fdb Removed useless installsuffix cgo from Docker Go build 2019-07-05 01:29:33 +02:00
Quentin McGaw
20f4ad8e49 Resolved screen size issue, final Docker image uses Scratch 2019-07-02 20:08:29 +02:00
Quentin McGaw
18d34d5c01 VERSION and VCS_REF build arguments are unset by default 2019-07-02 13:57:44 +02:00
Quentin McGaw
c89e396121 Lazydocker can be ran directly as entrypoint
Thanks to the script:

```sh
#!/bin/sh

resize > /dev/null
lazydocker $@
```
2019-07-01 15:39:52 +02:00
Quentin McGaw
fd70aaaf05 Git commit reference mechanism changed
- Git commit is passed as a build argument as explained in README.md
- `.git` directory is ignored by Docker for a quicker build and smaller context
- the build arg VCS_REF is used both to tag the image and the Go program
2019-07-01 15:37:55 +02:00
Quentin McGaw
330131b6ca Fixed Docker regarding no size window with gocui
- Runs the container with `/bin/sh` initially
- Invoke `lazydocker` from within the container, or gocui fails as the terminal window is invalid at launch
2019-07-01 11:57:50 +02:00
Quentin McGaw
ceb8cfcd76 Added Docker labels and Go commit, version and buildSource 2019-07-01 11:51:08 +02:00
Quentin McGaw
1542c70b53 Reworked Dockerfile for a more production oriented usage
- Added .dockerignore to speed up build context and avoid rebuilding when unecessary
- Specified Alpine and Go versions as build arguments
- Specified Go target CPU architecture as build arguments to be able to build for ARM devices
- Specified base images as build arguments to be able to build for ARM devices
- Trimmed down size of final image using `-a -installsuffix cgo -ldflags="-s -w"` go build flags and by copying the statically built binary only to the final image
- Added clear build and run instructions for the Docker container
2019-07-01 09:57:48 +02:00
Jesse Duffield
cf5ec17197 repurpose lazygit code 2019-05-12 10:32:02 +10:00