-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #339 from OutpostUniverse/updateDockerImage
Update Docker image
- Loading branch information
Showing
2 changed files
with
12 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,28 @@ | ||
# For building on CircleCI with Google Test | ||
|
||
# Build from the root project folder with: | ||
# docker build .circleci/ --tag outpostuniverse/circleci-gcc-clang-googletest | ||
# docker build .circleci/ --tag outpostuniverse/op2utility:1.1 | ||
# Push image to DockerHub with: | ||
# docker login | ||
# docker push outpostuniverse/circleci-gcc-clang-googletest | ||
# docker push outpostuniverse/op2utility | ||
|
||
# Run locally using the CircleCI command line interface: | ||
# circleci build | ||
# Validate .circleci/config.yml file with: | ||
# circleci config validate | ||
|
||
FROM ubuntu:18.04 | ||
FROM ubuntu:20.04 | ||
|
||
# Install CircleCI tools needed for primary containers | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
# Install Development tools, Google Test library, and tools for primary CircleCI container | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
clang \ | ||
cmake \ | ||
libgtest-dev \ | ||
libgmock-dev \ | ||
git \ | ||
ssh \ | ||
tar \ | ||
gzip \ | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install gcc and clang compilers | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
clang \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Google Test (source package and build dependencies) | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
cmake \ | ||
libgtest-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Compile and install Google Test | ||
ARG gtestBuildDir=/tmp/gtest/ | ||
RUN mkdir -p ${gtestBuildDir} && \ | ||
cd ${gtestBuildDir} && \ | ||
cmake -DCMAKE_CXX_FLAGS="-std=c++14" /usr/src/gtest/ && \ | ||
make -C ${gtestBuildDir} && \ | ||
cp ${gtestBuildDir}lib*.a /usr/lib && \ | ||
rm -rf ${gtestBuildDir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters