・ CLion ・ Docker for Windows
2 Docker
I wanted to touch Rust, so I installed it. It's not necessary if it's just a C compiler.
Dockerfile.
FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y ssh \
build-essential \
gcc \
g++ \
gdb \
clang \
cmake \
rsync \
tar \
python \
apt-utils \
git \
less \
neovim \
sudo \
curl \
file \
&& apt-get clean
## install rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
SHELL ["/bin/bash", "-c"]
RUN source ~/.cargo/env
ENV PATH $PATH:~/.cargo/bin
## SSH-Settings
RUN ( \
echo 'LogLevel DEBUG2'; \
echo 'PermitRootLogin yes'; \
echo 'PasswordAuthentication yes'; \
echo 'Subsystem sftp /usr/lib/openssh/sftp-server'; \
) > /etc/ssh/sshd_config_clion \
&& mkdir /run/sshd
## SSH-User
RUN useradd -m user \
&& yes password | passwd user
CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config_clion"]
docker-compose.yml
version: '3'
services:
remote_cpp:
container_name: remote_cpp
shm_size: 4096m
build: "./"
ports:
- '2222:22'
cap_add:
- SYS_PTRACE
tty: true
3 CLion
Select Toolchains from Settings and enter the release port on the Docker side, user / pass
With VS Code's Remote Development, you can develop hard with just the above Docker, but isn't there such a function in the Jetbrains IDE?
Recommended Posts