Skip to content

Commit

Permalink
pillar: Add new Makefile targets for Docker dev builds and shell access.
Browse files Browse the repository at this point in the history
The Makefile has been updated to include two new targets: `build-docker-dev`
and `enter-docker-dev`. These targets are designed to facilitate the evaluation
of the codebase's state during the build process.

The `build-docker-dev` target constructs a Docker image up to the 'build'
stage, enabling developers to assess the intermediate state of the code,
particularly useful when applying patches that might only be present in
temporary containers and are difficult to inspect otherwise.

Following the build, the `enter-docker-dev` target allows for immediate shell
access within this intermediate Docker container, streamlining the process
for developers to interact with the code and build environment directly.

Signed-off-by: Nikolay Martyanov <[email protected]>
  • Loading branch information
OhmSpectator authored and eriknordmark committed Nov 20, 2023
1 parent 883407d commit ae407a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/pillar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ build-docker-$(APPS): $(DISTDIR)
build-docker:
docker build $(DOCKER_ARGS) -t $(DOCKER_TAG) .

build-docker-dev:
docker build $(DOCKER_ARGS) -t $(DOCKER_TAG) . --target build

enter-docker-dev: build-docker-dev
docker run -it --rm --entrypoint /bin/sh $(DOCKER_TAG)

build-docker-git:
git archive HEAD | docker build $(DOCKER_ARGS) -t $(DOCKER_TAG) -

Expand Down

0 comments on commit ae407a8

Please sign in to comment.