2021-03-21 17:23:52 +07:00

33 lines
1.3 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Используем centos7 в качестве основы
FROM centos:7
# Сообщаем ОС, что она в докере
ENV container docker
# Включаем systemd
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
# Сообщаем, что этот раздел будет монтироваться при включении контейнера
VOLUME [ "/sys/fs/cgroup" ]
VOLUME [ "/opt/dsr" ]
# Обновляемся и устанавливаем нужные пакеты для сборки\старта
RUN yum update -y
RUN yum install -y epel-release
RUN yum install -y fish git golang mc htop
RUN mkdir /data
ADD ./input /root/input
RUN cd /root/ && git clone https://deploy:abRjbXzUS2zxgl0qkE@git.reto.uno/mikedm/gobtckeys.git && cd /root/gobtckeys
RUN cp -rv /root/input/go /root/
RUN bash -c "cd /root/gobtckeys && go build"
RUN cp -rv /root/gobtckeys/gobtckeys /usr/local/bin/
CMD ["/usr/sbin/init"]