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

Refine Cpp docker image and mark as GA #4367

Merged
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
7 changes: 7 additions & 0 deletions cpp/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*/*/.vs/
*/build/
*/cmake-build*/
*/*/build/
*/*/cmake-build*/
*/*/*/build/
*/*/*/cmake-build*/
42 changes: 38 additions & 4 deletions cpp/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]