Dockerfile:
FROM centos:7
RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup \
&& curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo \
&& sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo \
&& yum clean all && yum makecache \
&& yum install sudo gdb openssh-server initscripts lsof vim upx gcc gcc-c++ make automake wget openssl openssl-devel rsync -y \
&& /usr/sbin/sshd-keygen \
&& echo "PATH=\$PATH:/usr/local/bin" >> /etc/profile \
&& echo "1234qwer" | passwd sudo
# Then install cmake from source
# Make sure `which cmake` output right
# Then upgrade gdb from source to version 12.1
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
docker-compose.yaml:
version: '3'
services:
cppdev:
container_name: cppdev1
image: fuming/cppdev:1.2
ports:
- "8088:22"
cap_add:
- SYS_PTRACE
restart: always
After container started, use docker exec -it cppdev1 /bin/bash to attach container, then echo "New Root Password" | passwd root to replace the default root password(1234qwer).
Content type
Image
Digest
sha256:358150efc…
Size
901.8 MB
Last updated
about 3 years ago
docker pull fuming/cppdev:1.3