Skip to content

Instantly share code, notes, and snippets.

@grasses
Created February 28, 2019 14:13
Show Gist options
  • Save grasses/247cca6bf10c8100aaf78539f1fb77f1 to your computer and use it in GitHub Desktop.
Save grasses/247cca6bf10c8100aaf78539f1fb77f1 to your computer and use it in GitHub Desktop.
Dockerfiles
FROM ubuntu:16.04
RUN dpkg --add-architecture i386
RUN sed -i "s/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g" /etc/apt/sources.list
RUN apt-get update && apt-get -y dist-upgrade
RUN apt-get install -y xinetd libc6:i386 libncurses5:i386 libstdc++6:i386 socat
RUN apt-get install -y python2.7 python-pip
RUN useradd -m ctf
ADD ./CollisionsGame/ /home/ctf/
# xinted 连接失败信息
RUN echo "Blocked by xinetd" > /etc/banner_fail
RUN chown -R root:ctf /home/ctf &&\
chmod -R 750 /home/ctf &&\
pip install -r /home/ctf/requirements.txt -i https://pypi.doubanio.com/simple &&\
rm -f /home/ctf/requirements.txt &&\
rm -f /home/ctf/.sec_key &&\
rm -f /home/ctf/*.pyc &&\
chmod 740 /home/ctf/*.py &&\
chmod 740 /home/ctf/*.js &&\
chmod 740 /home/ctf/*.txt
WORKDIR /home/ctf
CMD ["python", "43ababd8a4588d639330bf35abdc6e05.py"]
EXPOSE 9999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment