Commit Graph

19 Commits (master)

Author SHA1 Message Date
Jesse Duffield e69449c824 Use go 1.20 7 months ago
Jesse Duffield e8c216a3f9 use alpine that supports go 1.18 2 years ago
Jesse Duffield 5de54dfb0e upgrade to go 1.18 2 years ago
Quentin McGaw 25e877539d Removed `PATH` variable definition in Dockerfile
As @ibnesayeed mentionned, some environment variables are actually defined even in Scratch Docker images. `PATH` contains `/bin` so there is no need to overwrite it.
5 years ago
Quentin McGaw 80fdf3142b Switched to opencontainers.org labels for Docker image 5 years ago
Quentin McGaw a497b56e36 Simplified readme instructions for Docker run and removed volume
- Volume did not work properly as the config would be persistent but not shared across restart of the container running interactively.
- Docker run instructions were therefore updated and simplified to bind mount the config directory as volume do not really work in this situation.
5 years ago
Quentin McGaw 84320dd4de Uses modules for Docker build 5 years ago
Quentin McGaw dedafb3acf All binaries are in `/bin` directory. 5 years ago
Quentin McGaw 98697c544e Added Docker CLI binary to final image 5 years ago
Quentin McGaw a01f704d61 Added volume to Dockerfile so bind mounting is optional 5 years ago
Quentin McGaw e637497fdb Removed useless `installsuffix cgo` from Docker Go build 5 years ago
Quentin McGaw 20f4ad8e49 Resolved screen size issue, final Docker image uses Scratch 5 years ago
Quentin McGaw 18d34d5c01 `VERSION` and `VCS_REF` build arguments are unset by default 5 years ago
Quentin McGaw c89e396121 Lazydocker can be ran directly as entrypoint
Thanks to the script:

```sh
#!/bin/sh

resize > /dev/null
lazydocker $@
```
5 years ago
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
5 years ago
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
5 years ago
Quentin McGaw ceb8cfcd76 Added Docker labels and Go commit, version and buildSource 5 years ago
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
5 years ago
Jesse Duffield cf5ec17197 repurpose lazygit code 5 years ago