Last active
May 25, 2019 10:34
-
-
Save MilesChou/c278f180b2c14af44bc752cdb437ab24 to your computer and use it in GitHub Desktop.
Dockerfile 懶人用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/make -f | |
IMAGE := $(shell basename $(shell pwd)) | |
VERSION := latest | |
.PHONY: all build rebuild shell run | |
# ------------------------------------------------------------------------------ | |
all: build | |
build: | |
docker build -t=$(IMAGE):$(VERSION) . | |
rebuild: | |
docker build -t=$(IMAGE):$(VERSION) --no-cache . | |
shell: | |
docker run --rm -it $(IMAGE):$(VERSION) sh | |
run: | |
docker run --rm -it $(IMAGE):$(VERSION) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment