update base image; add compose file
This commit is contained in:
8
Makefile
8
Makefile
@@ -16,21 +16,21 @@ bash:
|
||||
docker run --rm -it $(IMAGE_NAME):$(TAG) bash
|
||||
|
||||
env:
|
||||
@echo "FTP_USER=ftp" >> env
|
||||
@echo "FTP_PASSWORD=ftp" >> env
|
||||
@echo "FTP_USER=ftp" >> .env
|
||||
@echo "FTP_PASSWORD=ftp" >> .env
|
||||
|
||||
vsftpd.pem:
|
||||
openssl req -new -newkey rsa:2048 -days 365 -nodes -sha256 -x509 -keyout vsftpd.pem -out vsftpd.pem -subj '/CN=self_signed'
|
||||
|
||||
run: env
|
||||
$(eval ID := $(shell docker run -d --env-file env -v $(shell pwd)/srv:/srv ${IMAGE_NAME}:${TAG}))
|
||||
$(eval ID := $(shell docker run -d --env-file .env -v $(shell pwd)/srv:/srv ${IMAGE_NAME}:${TAG}))
|
||||
$(eval IP := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${ID}))
|
||||
@echo "Running ${ID} @ ftp://${IP}"
|
||||
@docker attach ${ID}
|
||||
@docker kill ${ID}
|
||||
|
||||
run-ssl: env vsftpd.pem
|
||||
$(eval ID := $(shell docker run -d --env-file env -v $(shell pwd)/srv:/srv -v $(PWD)/vsftpd.pem:/etc/ssl/certs/vsftpd.crt -v $(PWD)/vsftpd.pem:/etc/ssl/private/vsftpd.key ${IMAGE_NAME}:${TAG} vsftpd /etc/vsftpd_ssl.conf))
|
||||
$(eval ID := $(shell docker run -d --env-file .env -v $(shell pwd)/srv:/srv -v $(PWD)/vsftpd.pem:/etc/ssl/certs/vsftpd.crt -v $(PWD)/vsftpd.pem:/etc/ssl/private/vsftpd.key ${IMAGE_NAME}:${TAG} vsftpd /etc/vsftpd_ssl.conf))
|
||||
$(eval IP := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${ID}))
|
||||
@echo "Running ${ID} @ ftp://${IP}"
|
||||
@docker attach ${ID}
|
||||
|
||||
Reference in New Issue
Block a user