Created
September 1, 2016 22:43
-
-
Save val314159/91d0ac017918c78a09a4c951aa48e652 to your computer and use it in GitHub Desktop.
Docker Makefile
This file contains hidden or 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
NAME=vvm | |
all: clean build rund ; | |
clean: ; rm -f Dockerfile ; docker rm -f $(NAME) ; true | |
build: Dockerfile ; docker build --tag $(NAME) . && rm Dockerfile | |
runi: ; docker run -it --name $(NAME) $(NAME) | |
rund: ; docker run -d --name $(NAME) $(NAME) | |
exec: ; docker exec -it $(NAME) /bin/bash -c "TERM=$(TERM) exec bash" | |
ps: ; docker ps | |
Dockerfile: Makefile ; echo "$$DOCKERFILE" >Dockerfile | |
######################################## ###################################### | |
export DOCKERFILE | |
define DOCKERFILE | |
FROM ubuntu:latest | |
RUN apt-get -y update && apt-get -y upgrade | |
RUN apt-get -y install apt-utils | |
RUN apt-get -y update && apt-get -y upgrade | |
RUN apt-get -y install build-essential emacs wget curl telnet | |
RUN apt-get -y install python python-gevent python-bottle | |
RUN apt-get -y install ipython | |
RUN apt-get -y install screen | |
RUN echo >> /bin/loop '#!/bin/bash' | |
RUN echo >> /bin/loop 'while : ; do date ; sleep 10; done' | |
RUN chmod +x /bin/loop | |
WORKDIR /root | |
RUN echo 'exec >/dev/tty 2>/dev/tty </dev/tty' >>/root/.bashrc | |
#CMD /bin/bash -c 'while : ; do date ; sleep 10; done' | |
CMD /bin/loop | |
endef |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment