Skip to content

Commit

Permalink
Refine Cpp docker image and mark as GA (#4367)
Browse files Browse the repository at this point in the history
* updated docker file
* added docker ignore
  • Loading branch information
meyertst-aws authored Feb 9, 2023
1 parent 555b6c0 commit 91868cf
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
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"]

0 comments on commit 91868cf

Please sign in to comment.