diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..de56e59 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,23 @@ + +FROM ubuntu:21.04 + +ARG DEBIAN_FRONTEND=noninteractive + +# Following https://github.com/zouzias/docker-boost/blob/master/Dockerfile + +ENV BOOST_VERSION=1.77.0 +ENV BOOST_VERSION_=1_77_0 +ENV BOOST_ROOT=/usr/include/boost + +RUN apt-get -qq update && apt-get install -q -y software-properties-common +RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y +RUN apt-get -qq update && apt-get install -qy g++ gcc git wget cmake libspdlog-dev python3 python3-pip gdb libssl-dev + +RUN wget --max-redirect 3 https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_}.tar.gz +RUN mkdir -p /usr/include/boost && tar zxf boost_${BOOST_VERSION_}.tar.gz -C /usr/include/boost --strip-components=1 + +RUN mkdir /home/app +WORKDIR /home/app + +RUN echo ${BOOST_ROOT} +ENTRYPOINT /bin/bash diff --git a/start_dev_env.sh b/start_dev_env.sh new file mode 100755 index 0000000..a63f426 --- /dev/null +++ b/start_dev_env.sh @@ -0,0 +1,7 @@ + +if [[ "$(docker images -q cpp_dev_env:latest 2> /dev/null)" == "" ]]; then + docker build -f Dockerfile.dev . -t cpp_dev_env +fi + + +docker run -ti --rm -v ${PWD}:/home/app cpp_dev_env bash