Sign inSign up

liji1991/cpp20

By liji1991

Updated almost 5 years ago

C++20 environment , that can be connected by vscode.

Image
1

10K+

liji1991/cpp20 repository overview

Dockerfile

FROM icemap/gcc11-python3.9:latest
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get update && apt-get install -y openssh-client openssh-server
RUN sed -i 's/.*PermitEmptyPasswords no.*/PermitEmptyPasswords yes/g' /etc/ssh/sshd_config 
RUN sed -i 's/.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config 
RUN sed -i 's/.*UsePAM.*/UsePAM no/g' /etc/ssh/sshd_config 
RUN echo "root:123" | chpasswd
#RUN exec bash && source /etc/ssh/sshd_config && service ssh restart
EXPOSE 22

Step 1

sudo docker run \
    --restart=always \
    --privileged \
    --ulimit core=-1 \
    -idt \
    -p 8000:22 \
    -v /home:/home \
    --name=cpp20 \
    liji1991/cpp20 \
    /bin/bash

Step 2

sudo docker exec -it cpp20 /bin/bash

In the container cpp20 shell type this CMD

service ssh restart

Step 3

  1. remove .ssh/known_hosts
  2. edit .ssh/config
Host name
  HostName xxx.xxx.xxx.xxx
  User root
  Port 8000
  IdentityFile "C:\\Users\\xxx\.ssh\xxx"

Step 4

vscode install Remote - SSH

root passwd: 123

Tag summary

Content type

Image

Digest

Size

322.8 MB

Last updated

almost 5 years ago

docker pull liji1991/cpp20