Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C++ docker development environment #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions start_dev_env.sh
Original file line number Diff line number Diff line change
@@ -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