-
-
Save val314159/3b384398406822f231bf58727c73fa70 to your computer and use it in GitHub Desktop.
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/env perl -ne if(s/^.MF//g){print;}else{;} | |
#MF#Makefile: | |
#MFall: run | |
#MFMakefile: Dockerfile ; ./Dockerfile > Makefile | |
#MFDARGS=--rm -it -p 80:8020 -p 8080:8080 -p 2020:2020 | |
#MFrun: build ; docker run $(DARGS) --name cc cc | |
#MFsshd: build ; docker run -d -p 80:8020 -p 8080:8080 -p 2020:2020 --name cc cc | |
#MFbrun: build ; docker run $(DARGS) --name cc cc bash | |
#MFtrun: build ; docker run $(DARGS) --name cc cc bin/test.sh | |
#MFtrun2:build ; docker run $(DARGS) --name cc cc bin/test2.sh | |
#MFtrun3:build ; docker run $(DARGS) --name cc cc bin/test3.sh | |
#MFexec: ; docker exec -it cc bash | |
#MFbuild: .ssh; docker build --tag cc . | |
#MF.ssh: ; cp -r ~/.ssh . | |
FROM ubuntu | |
RUN apt-get -y update && apt-get -y upgrade \ | |
&& apt-get -y update && apt-get -y upgrade && apt-get -y install apt-utils \ | |
&& apt-get -y install python-pip python-gevent python-leveldb python-numpy \ | |
git screen curl wget tree emacs-nox libgmp-dev psmisc python-toml \ | |
python-future python-docopt python-wsaccel python-websocket \ | |
python-gevent-websocket python-yaml python-cryptography \ | |
openssh-server python-bottle python-jinja2 \ | |
&& pip install pkcrypt websocket-client \ | |
&& echo root:toor | chpasswd | |
RUN mkdir /run/sshd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
# SSH login fix. Otherwise user is kicked off after login | |
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | |
ENV NOTVISIBLE "in users profile" | |
RUN echo "export VISIBLE=now" >> /etc/profile | |
RUN useradd -ms /bin/bash val | |
RUN echo val:v | chpasswd | |
WORKDIR /home/val | |
COPY .ssh/ /home/val/.ssh | |
RUN chown -R val:val /home/val/.ssh | |
USER val | |
RUN echo > /home/val/.gitconfig '\ | |
[user]\n\ | |
email = jmward@gmail.com\n\ | |
name = @val314159\n\ | |
' | |
RUN echo >/home/val/.bash_aliases '\ | |
alias pull="git pull"\n\ | |
alias update="git commit -am update && git push"\n\ | |
alias ccreate="python -um catcoin ccreate"\n\ | |
alias crename="python -um catcoin crename"\n\ | |
alias launch="python -um catcoin launch"\n\ | |
alias create="python -um catcoin create"\n\ | |
alias erase="python -um catcoin erase"\n\ | |
alias meow="python -um catcoin meow"\n\ | |
alias purr="python -um catcoin purr"\n\ | |
alias hiss="python -um catcoin hiss"\n\ | |
export LANG=C.UTF-8\n\ | |
export PYTHONUNBUFFERED=1\n\ | |
export LOGLEVEL=1\n\ | |
' | |
RUN git clone git@gitlab.com:val314159/catcoinledger.git | |
WORKDIR /home/val/catcoinledger | |
WORKDIR / | |
USER root | |
CMD ["/usr/sbin/sshd","-p","2020","-D"] | |
EXPOSE 8020 8080 9090 | |
EXPOSE 8120 8180 9190 | |
EXPOSE 8220 8280 9290 | |
EXPOSE 2020 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment