9 Commits

Author SHA1 Message Date
dependabot[bot] 41d12695ed build(deps): bump golang from 1.24.3-alpine to 1.24.4-alpine (#496)
Bumps golang from 1.24.3-alpine to 1.24.4-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.4-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony Truong <tonytrg@github.com>
2025-06-17 17:26:59 +02:00
Juan Antonio Osorio 63d3d8c60e fix: use ENTRYPOINT and CMD for proper argument handling (#454)
* fix: use ENTRYPOINT and CMD for proper argument handling

- Change from CMD to ENTRYPOINT + CMD pattern for better Docker practices
- ENTRYPOINT sets the executable that always runs
- CMD provides default arguments that can be overridden
- This allows container runtimes to properly append additional arguments
- Fixes issues with argument passing in container orchestration tools

Before: CMD ["./github-mcp-server", "stdio"]
After: ENTRYPOINT ["./github-mcp-server"] + CMD ["stdio"]

* address review feedback: use absolute path and improve comments
2025-06-03 00:19:59 +02:00
dependabot[bot] bd6f90dc9c build(deps): bump golang from 1.24.2-alpine to 1.24.3-alpine
Bumps golang from 1.24.2-alpine to 1.24.3-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.3-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-13 12:55:51 +02:00
Eng Zer Jun 29bf8bfebc Optimize Docker build with bind mounts (#208)
* Optimize Docker build with bind mounts

This commit further optimize the Docker builds on top of PR #92 with:

1. Add .dockerignore file to exclude non-source code files [1].

2. Use Alpine image variant for build stage to reduce download size.
   golang:1.23.7-alpine is 200 MB smaller than golang:1.23.7 [2][3].

3. Replace COPY instruction with RUN --mount=type=bind. Bind mounts do
   not add unnecessary layers to the cache [4][5].

[1]: https://docs.docker.com/build-cloud/optimization/#dockerignore-files
[2]: https://hub.docker.com/layers/library/golang/1.23.7-alpine/images/sha256-333d4ba78773b3a3ae9cf2cff8962df56effc5c9481faa355f211abf2baf175c
[3]: https://hub.docker.com/layers/library/golang/1.23.7/images/sha256-2087a99c3235972660b3d35c1564d9d1a3f639dcace9c790acbabc7e938d1570
[4]: https://docs.docker.com/build/building/best-practices/#add-or-copy
[5]: https://docs.docker.com/build/cache/optimize/#use-bind-mounts

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* Remove `go mod download` step

`go build` will automatically download module dependencies. In many
cases, that is a much smaller set of modules than what is downloaded by
`go mod download`.

Size of GOMODCACHE with `go mod download:

	$ go clean -i -r -cache -modcache
	$ go mod download
	$ du -sh ~/go/pkg/mod
	186M	/home/jun/go/pkg/mod

Size of GOMODCACHE with `go build`:

	$ go clean -i -r -cache -modcache
	$ CGO_ENABLED=0 go build -ldflags="-s -w" cmd/github-mcp-server/main.go
	go: downloading github.com/spf13/viper v1.20.1
	go: downloading github.com/mark3labs/mcp-go v0.18.0
	go: downloading github.com/google/go-github/v69 v69.2.0
	go: downloading github.com/sirupsen/logrus v1.9.3
	go: downloading github.com/spf13/cobra v1.9.1
	go: downloading golang.org/x/sys v0.31.0
	go: downloading github.com/spf13/afero v1.14.0
	go: downloading github.com/fsnotify/fsnotify v1.8.0
	go: downloading github.com/spf13/cast v1.7.1
	go: downloading github.com/go-viper/mapstructure/v2 v2.2.1
	go: downloading github.com/subosito/gotenv v1.6.0
	go: downloading gopkg.in/yaml.v3 v3.0.1
	go: downloading github.com/spf13/pflag v1.0.6
	go: downloading github.com/pelletier/go-toml/v2 v2.2.3
	go: downloading github.com/sagikazarmark/locafero v0.9.0
	go: downloading golang.org/x/text v0.23.0
	go: downloading github.com/google/uuid v1.6.0
	go: downloading github.com/yosida95/uritemplate/v3 v3.0.2
	go: downloading github.com/sourcegraph/conc v0.3.0
	go: downloading github.com/google/go-querystring v1.1.0
	$ du -sh ~/go/pkg/mod
	80M	/home/jun/go/pkg/mod

Reference: https://stackoverflow.com/a/68172023/7902371
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-05-07 17:09:28 +02:00
dependabot[bot] 3134b0996a Bump golang from 1.23.7 to 1.24.2
Bumps golang from 1.23.7 to 1.24.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-23 17:27:40 +02:00
Ariel Deitcher 9e2b1f03a5 speed up docker builds (#92) 2025-04-03 15:19:00 -07:00
Sam Morrow 5c6f43d237 chore: set build arg for publishing version (#74) 2025-04-03 13:16:09 +02:00
Sam Morrow fa8c23ae47 add ld flags so version is included in docker releases (#73) 2025-04-03 12:56:44 +02:00
Sam Morrow fca7cd754b chore: add dockerfile 2025-03-20 15:45:09 +01:00