Skip to content

Instantly share code, notes, and snippets.

@MilesChou
Last active May 25, 2019 10:34
Show Gist options
  • Save MilesChou/c278f180b2c14af44bc752cdb437ab24 to your computer and use it in GitHub Desktop.
Save MilesChou/c278f180b2c14af44bc752cdb437ab24 to your computer and use it in GitHub Desktop.
Dockerfile 懶人用
#!/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