diff --git a/cpp/.dockerignore b/cpp/.dockerignore new file mode 100644 index 00000000000..a1e644d5bdf --- /dev/null +++ b/cpp/.dockerignore @@ -0,0 +1,7 @@ +/*/*/.vs/ +*/build/ +*/cmake-build*/ +*/*/build/ +*/*/cmake-build*/ +*/*/*/build/ +*/*/*/cmake-build*/ \ No newline at end of file diff --git a/cpp/Dockerfile b/cpp/Dockerfile index cd5f9e6ade1..855043baeec 100644 --- a/cpp/Dockerfile +++ b/cpp/Dockerfile @@ -1,6 +1,40 @@ -# syntax=docker/dockerfile:1 -# Status: Beta -# GA updates: https://github.com/awsdocs/aws-doc-sdk-examples/issues/4133 -FROM gcc:4.9 +# This DockerFile was copied from the AWS SDK for C++. +# https://github.com/aws/aws-sdk-cpp/blob/master/CI/docker-file/Ubuntu/20.04/Dockerfile +# Additional run steps were added. + +# Using official ubuntu docker image +FROM ubuntu:20.04 + +# Install git, zip, python-pip, cmake, g++, zlib, libssl, libcurl, java, maven via apt +# Specify DEBIAN_FRONTEND and TZ to prevent tzdata hanging +RUN apt-get update && \ + apt-get upgrade -y && \ + DEBIAN_FRONTEND="noninteractive" TZ="America/Los_Angeles" apt-get install -y git zip wget python3 python3-pip cmake g++ zlib1g-dev libssl-dev libcurl4-openssl-dev openjdk-8-jdk doxygen ninja-build + +RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10 + +# Install maven +RUN apt-get install -y maven + +# Install awscli +#RUN pip install awscli --upgrade + +RUN mkdir /src COPY . /src/ + +ENV SERVICES="autoscaling;ec2;iam;dynamodb;glue;lambda;monitoring;s3;sts" + +RUN mkdir /src/aws && \ + cd /src/aws && \ + git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp && \ + cd aws-sdk-cpp && \ + mkdir build && \ + cd build && \ + cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_ONLY=${SERVICES} -DENABLE_TESTING=OFF && \ + make && \ + make install + +WORKDIR /src + CMD ["bash"] +