Skip to content

Makefile: Simplify environment bootstrapping#169

Merged
timflannagan merged 2 commits intoagentregistry-dev:mainfrom
timflannagan:chore/refactor-ci-workflows
Feb 16, 2026
Merged

Makefile: Simplify environment bootstrapping#169
timflannagan merged 2 commits intoagentregistry-dev:mainfrom
timflannagan:chore/refactor-ci-workflows

Conversation

@timflannagan
Copy link
Copy Markdown
Collaborator

Introduce the "run" and "down" Makefile targets that provide a single target I can use for both local & CI. Updates the build.yml workflow to adopt that new target, which removes some of the existing spaghetti as well.

Introduces a unified entry point for spinning up the local development
environment. The run target starts the docker registry, docker-compose
stack (Postgres + server), and builds the CLI.

This sets the foundation for unifying local and CI test workflows.
Replaces inline docker-compose commands with the unified run target.
This aligns CI with local development and removes duplicate go mod
download and explicit go build steps (now handled by run target).
Comment on lines -41 to -42
- name: Download Go dependencies
run: go mod download
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm not sure this is correct. Lemme double check what's right here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nvm, had it right the first time. The build-cli command calls this already so there were three instances where go mod download was being called before #167 was merged earlier today lol.

@timflannagan timflannagan merged commit 98cb88c into agentregistry-dev:main Feb 16, 2026
3 checks passed
@timflannagan timflannagan deleted the chore/refactor-ci-workflows branch February 16, 2026 21:54
timflannagan added a commit to timflannagan/agentregistry that referenced this pull request Feb 20, 2026
Introduce the "run" and "down" Makefile targets that provide a single
target I can use for both local & CI. Updates the build.yml workflow to
adopt that new target, which removes some of the existing spaghetti as
well.
github-merge-queue bot pushed a commit that referenced this pull request Mar 3, 2026
# Description

Docker build fails when `ui/node_modules` is present locally due to a
bad file descriptor error during build context transfer. No
`.dockerignore` existed to prevent unnecessary files from being sent to
the Docker daemon.

Adds a `.dockerignore` file that excludes `ui/node_modules` (the primary
cause of the error) along with other irrelevant files such as `.git/`,
IDE configs, OS metadata, Go/UI build artifacts, docs, and test
directories.

Fixes #169

# Change Type

/kind cleanup

# Changelog

```release-note
NONE
```

# Additional Notes

The `ui/node_modules` directory can contain symlinks or special files
(like the `classPrivateFieldSet.js` reported in the issue) that cause
`lstat` errors during Docker build context transfer on some systems.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Ignore UI node modules when building server
image</issue_title>
> <issue_description>When I try to build the server docker image
locally, I'm running into the following error:
> 
> ```bash
> $ docker buildx build --push --platform linux/arm64 -f
docker/server.Dockerfile -t
localhost:5001/agentregistry-dev/agentregistry/server:v0.2.0-2-g8184a2d
--build-arg LDFLAGS="-s -w -X
'github.com/agentregistry-dev/agentregistry/internal/version.Version=v0.2.0-2-g8184a2d'
-X
'github.com/agentregistry-dev/agentregistry/internal/version.GitCommit=8184a2d'
-X
'github.com/agentregistry-dev/agentregistry/internal/version.BuildDate=2026-03-03'
-X
'github.com/agentregistry-dev/agentregistry/internal/version.DockerRegistry=localhost:5001'"
.
> [+] Building 1.3s (12/33) docker:default
> => [internal] load build definition from server.Dockerfile 0.1s
> => => transferring dockerfile: 2.78kB 0.0s
> => [internal] load metadata for docker.io/library/ubuntu:22.04 0.7s
> => [internal] load metadata for docker.io/library/node:22-alpine 0.6s
> => [internal] load metadata for docker.io/library/golang:1.25-alpine
0.7s
> => [auth] library/node:pull token for registry-1.docker.io 0.0s
> => [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
> => [auth] library/golang:pull token for registry-1.docker.io 0.0s
> => [internal] load .dockerignore 0.1s
> => => transferring context: 2B 0.0s
> => [ui-builder 1/8] FROM
docker.io/library/node:22-alpine@sha256:e4bf2a82ad0a4037d28035ae71529873c069b13eb0455466ae0bc13363826e34
0.0s
> => [builder 1/10] FROM
docker.io/library/golang:1.25-alpine@sha256:f6751d823c26342f9506c03797d2527668d095b0a15f1862cddb4d927a7a4ced
0.0s
> => ERROR [internal] load build context 0.2s
> => => transferring context: 7.89MB 0.1s
> => [runtime 1/6] FROM
docker.io/library/ubuntu:22.04@sha256:3ba65aa20f86a0fad9df2b2c259c613df006b2e6d0bfcc8a146afb8c525a9751
0.0s
> ------
>  > [internal] load build context:
> ------
> ERROR: failed to solve: error from sender: lstat
ui/node_modules/@babel/helpers/lib/helpers/classPrivateFieldSet.js: bad
message
> make[1]: *** [Makefile:241: docker-server] Error 1
> make[1]: Leaving directory '/work/agentregistry'
> make: *** [Makefile:117: run] Error 2
> ```
> 
> I'll look into adding a .dockerignore file to this repository that
ignores the node_modules.</issue_description>
> 
> <agent_instructions>Bootstrap a .dockerignore file that ignores the
node_modules directory along with any other files/directories relevant
to this repository. Avoid bloating this file with unnecessary
cruft.</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #248

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: timflannagan <[email protected]>
christian-posta pushed a commit to christian-posta/agentregistry that referenced this pull request Mar 9, 2026
Introduce the "run" and "down" Makefile targets that provide a single
target I can use for both local & CI. Updates the build.yml workflow to
adopt that new target, which removes some of the existing spaghetti as
well.
christian-posta pushed a commit to christian-posta/agentregistry that referenced this pull request Mar 9, 2026
…tregistry-dev#249)

# Description

Docker build fails when `ui/node_modules` is present locally due to a
bad file descriptor error during build context transfer. No
`.dockerignore` existed to prevent unnecessary files from being sent to
the Docker daemon.

Adds a `.dockerignore` file that excludes `ui/node_modules` (the primary
cause of the error) along with other irrelevant files such as `.git/`,
IDE configs, OS metadata, Go/UI build artifacts, docs, and test
directories.

Fixes agentregistry-dev#169

# Change Type

/kind cleanup

# Changelog

```release-note
NONE
```

# Additional Notes

The `ui/node_modules` directory can contain symlinks or special files
(like the `classPrivateFieldSet.js` reported in the issue) that cause
`lstat` errors during Docker build context transfer on some systems.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Ignore UI node modules when building server
image</issue_title>
> <issue_description>When I try to build the server docker image
locally, I'm running into the following error:
> 
> ```bash
> $ docker buildx build --push --platform linux/arm64 -f
docker/server.Dockerfile -t
localhost:5001/agentregistry-dev/agentregistry/server:v0.2.0-2-g8184a2d
--build-arg LDFLAGS="-s -w -X
'github.com/agentregistry-dev/agentregistry/internal/version.Version=v0.2.0-2-g8184a2d'
-X
'github.com/agentregistry-dev/agentregistry/internal/version.GitCommit=8184a2d'
-X
'github.com/agentregistry-dev/agentregistry/internal/version.BuildDate=2026-03-03'
-X
'github.com/agentregistry-dev/agentregistry/internal/version.DockerRegistry=localhost:5001'"
.
> [+] Building 1.3s (12/33) docker:default
> => [internal] load build definition from server.Dockerfile 0.1s
> => => transferring dockerfile: 2.78kB 0.0s
> => [internal] load metadata for docker.io/library/ubuntu:22.04 0.7s
> => [internal] load metadata for docker.io/library/node:22-alpine 0.6s
> => [internal] load metadata for docker.io/library/golang:1.25-alpine
0.7s
> => [auth] library/node:pull token for registry-1.docker.io 0.0s
> => [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
> => [auth] library/golang:pull token for registry-1.docker.io 0.0s
> => [internal] load .dockerignore 0.1s
> => => transferring context: 2B 0.0s
> => [ui-builder 1/8] FROM
docker.io/library/node:22-alpine@sha256:e4bf2a82ad0a4037d28035ae71529873c069b13eb0455466ae0bc13363826e34
0.0s
> => [builder 1/10] FROM
docker.io/library/golang:1.25-alpine@sha256:f6751d823c26342f9506c03797d2527668d095b0a15f1862cddb4d927a7a4ced
0.0s
> => ERROR [internal] load build context 0.2s
> => => transferring context: 7.89MB 0.1s
> => [runtime 1/6] FROM
docker.io/library/ubuntu:22.04@sha256:3ba65aa20f86a0fad9df2b2c259c613df006b2e6d0bfcc8a146afb8c525a9751
0.0s
> ------
>  > [internal] load build context:
> ------
> ERROR: failed to solve: error from sender: lstat
ui/node_modules/@babel/helpers/lib/helpers/classPrivateFieldSet.js: bad
message
> make[1]: *** [Makefile:241: docker-server] Error 1
> make[1]: Leaving directory '/work/agentregistry'
> make: *** [Makefile:117: run] Error 2
> ```
> 
> I'll look into adding a .dockerignore file to this repository that
ignores the node_modules.</issue_description>
> 
> <agent_instructions>Bootstrap a .dockerignore file that ignores the
node_modules directory along with any other files/directories relevant
to this repository. Avoid bloating this file with unnecessary
cruft.</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes agentregistry-dev#248

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: timflannagan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants