Sign inSign up

wkusnierczyk/clion-cpp-env

By wkusnierczyk

Updated about 6 years ago

Docker image for CLion build environment with with GCC version 10.

Image
0

1.1K

wkusnierczyk/clion-cpp-env repository overview

wkusnierczyk/clion-cpp-env

Docker image for CLion build environment with with gcc/g++ version 10.

Run

To use the latest release of the image:

docker run \
   -d \
   --cap-add sys_ptrace \
   --publish 127.0.0.1:2222:22 \
   --name clion_remote_env \
   wkusnierczyk/clion-cpp-env

ssh-keygen -f "$HOME/.ssh/known_hosts" -R "[localhost]:2222"

Reference

Dockerfile

See https://github.com/wkusnierczyk/clion-gcc.git for the source Dockerfile.

# CLion remote docker environment (How to build docker container, run and stop it)
# Based on https://github.com/JetBrains/clion-remote/blob/master/Dockerfile.remote-cpp-env
# See https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/ for context
# Modified to use the gcc base image for the latest gcc compiler version
#
# Build and run:
#   docker build -t wkusnierczyk/clion-cpp-env:latest -f Dockerfile.remote-cpp-env .
#   docker run -d --cap-add sys_ptrace -p127.0.0.1:2222:22 --name clion_remote_env wkusnierczyk/clion-cpp-env:latest
#   ssh-keygen -f "$HOME/.ssh/known_hosts" -R "[localhost]:2222"
#
# stop:
#   docker stop clion_remote_env
#
# ssh credentials (test user):
#   user@password

FROM gcc:10.2.0

RUN apt-get update \
  && apt-get install -y ssh \
      build-essential \
      gdb \
      clang \
      cmake \
      rsync \
      tar \
      python \
  && apt-get clean

RUN ( \
    echo 'LogLevel DEBUG2'; \
    echo 'PermitRootLogin yes'; \
    echo 'PasswordAuthentication yes'; \
    echo 'Subsystem sftp /usr/lib/openssh/sftp-server'; \
  ) > /etc/ssh/sshd_config_test_clion \
  && mkdir /run/sshd

RUN useradd -m user \
  && yes password | passwd user

CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config_test_clion"]

Tag summary

Content type

Image

Digest

Size

558.9 MB

Last updated

about 6 years ago

docker pull wkusnierczyk/clion-cpp-env