SaaShup / SaaShup/netbox-docker-agent
:sparkles: Support `docker build` workflow
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43
- Forks
- 2
- Avg merge
- 40m
- Merged PRs (30d)
- 2
Description
Context
The CLI command docker build can be used to create new Docker images:
docker build -t myimage:mytag1 -t myimage:mytag2 -f path/to/Dockerfile path/to/build/context
This command will create an archive (tar.gz, tar.xz? can't remember...) of the path/to/build/context folder and upload it to the Docker host. The Docker host will then look for path/to/Dockerfile within that archive and build a Docker image out of it.
It will tag it with myimage:mytag1 and myimage:mytag2.
Such image will not have any DigestID since it does not come from a Docker registry.
Proposal
Add a new API endpoint to the Netbox Docker Agent, such that:
curl \
-X POST \
--data @build-context.tar.gz \
$BASE_URL/api/builder?t=myimage:mytag01&t=myimage:mytag02&f=path/to/Dockerfile
- the
tquery parameters (which can appear multiple times) would define which tags to create for the newly built Docker image - the
fquery parameter would specify the path of the Dockerfile within the build context (it defaults toDockerfile) - the body of the request is the build context archive
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the proposed POST /api/builder contract and determine how the Docker agent should receive the build-context archive. Define completion around accepting repeated t tags, honoring the f path with Dockerfile as the default, and building the image without requiring a registry digest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100