Add default user to Makefile run and mount /srv externally

This commit is contained in:
Tim Robinson
2017-07-29 13:09:39 +10:00
parent 56675e6eec
commit d1ef03b7f6
2 changed files with 9 additions and 2 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.swp
srv/
env

View File

@@ -14,8 +14,12 @@ build:
bash:
docker run --rm -it $(docker_tag) bash
run:
$(eval ID := $(shell docker run -d ${docker_tag}))
env:
@echo "FTP_USER=ftp" >> env
@echo "FTP_PASSWORD=ftp" >> env
run: env
$(eval ID := $(shell docker run -d --env-file env -v $(shell pwd)/srv:/srv ${docker_tag}))
$(eval IP := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${ID}))
@echo "Running ${ID} @ ftp://${IP}"
@docker attach ${ID}