Skip to content

Commit

Permalink
Make: don't destroy docker image after make, it's annoying
Browse files Browse the repository at this point in the history
  • Loading branch information
arbitar committed Dec 16, 2022
1 parent 6b308a3 commit b193287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
all:
docker build -t uhandles .
docker run --rm -v "${PWD}":/host uhandles
docker rmi uhandles

docker-prep:
docker build -t uhandles .
Expand All @@ -17,3 +16,4 @@ build:

clean:
rm uhandles
docker rmi uhandles || true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Note the newline between the two. Also, `input_2.txt` is ignored, because it doe
## Build
If you're cool and already have a good working Go build environment on your system, just run `make build`.

I'm not cool though, and I'm pretty lazy, so I use Docker for this kind of thing, which is why it's the default make target. Just run `make` on a system with Docker running on it, and a build image will be created, `make build` executed within the container where all the prerequisites exist, and the build image will be removed after it's done.
I'm not cool though, and I'm pretty lazy, so I use Docker for this kind of thing, which is why it's the default make target. Just run `make` on a system with Docker running on it, and a build image will be created, and `make build` will be executed within the container where all the prerequisites exist.

If you're iterating, you can `make docker-prep` to create the image, `make docker-build` repeatedly to run the build, and `make docker-clean` to remove the image.

Expand Down

0 comments on commit b193287

Please sign in to comment.