Skip to content

Commit

Permalink
Docker Images (#113)
Browse files Browse the repository at this point in the history
* add docker image build workflows
  • Loading branch information
RogerZhongAWS authored Mar 6, 2023
1 parent f460fdf commit c9a3375
Show file tree
Hide file tree
Showing 15 changed files with 1,446 additions and 7 deletions.
26 changes: 26 additions & 0 deletions .github/docker-images/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG OS
ARG BASE_IMAGE
FROM ${BASE_IMAGE} AS deploy

###############################################################################
# Copy and build local proxy
###############################################################################
COPY . /root/aws-iot-securetunneling-localproxy
RUN mkdir -p /root/aws-iot-securetunneling-localproxy/build \
&& cd /root/aws-iot-securetunneling-localproxy/build \
&& cmake .. \
&& make

FROM ${OS} AS minimum_size

COPY --from=deploy /root/aws-iot-securetunneling-localproxy/build/bin/localproxy /root/bin/localproxy

COPY ./.github/docker-images/oss-compliance /root/oss-compliance
RUN HOME_DIR=/root \
&& cd ${HOME_DIR}/oss-compliance \
&& chmod +x ${HOME_DIR}/oss-compliance/generate-oss-compliance.sh \
&& chmod +x ${HOME_DIR}/oss-compliance/test/test-oss-compliance.sh \
&& bash ${HOME_DIR}/oss-compliance/generate-oss-compliance.sh ${HOME_DIR} \
&& rm -rf ${HOME_DIR}/oss-compliance*

ENTRYPOINT ["/root/bin"]
55 changes: 55 additions & 0 deletions .github/docker-images/base-images/amazonlinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM amazonlinux:latest as base
ARG OPENSSL_CONFIG

# Install Prerequisites

RUN yum check-update; yum upgrade -y && \
yum install -y git boost-devel autoconf automake \
wget libtool curl make gcc-c++ unzip cmake3 python-devel openssl11-devel which

# Install Dependencies

RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
RUN mkdir /home/dependencies

WORKDIR /home/dependencies
RUN wget https://www.zlib.net/zlib-1.2.13.tar.gz -O /tmp/zlib-1.2.13.tar.gz && \
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install

WORKDIR /home/dependencies
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz -O /tmp/boost.tar.gz && \
tar xzvf /tmp/boost.tar.gz && \
cd boost_1_81_0 && \
./bootstrap.sh && \
./b2 install link=static

WORKDIR /home/dependencies
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz && \
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install

WORKDIR /home/dependencies
RUN git clone https://github.com/openssl/openssl.git && \
cd openssl && \
git checkout OpenSSL_1_1_1-stable && \
./config && \
make depend && \
make all

WORKDIR /home/dependencies
RUN git clone --branch v2.13.6 https://github.com/catchorg/Catch2.git && \
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
54 changes: 54 additions & 0 deletions .github/docker-images/base-images/debian-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
ARG OS
FROM ${OS} AS base

# Install Prerequisites

RUN apt update && apt upgrade -y && \
apt install -y git libboost-all-dev autoconf automake \
wget libtool curl make g++ unzip cmake libssl-dev python3

# Install Dependencies

RUN mkdir /home/dependencies

WORKDIR /home/dependencies
RUN wget https://www.zlib.net/zlib-1.2.13.tar.gz -O /tmp/zlib-1.2.13.tar.gz && \
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install

WORKDIR /home/dependencies
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz -O /tmp/boost.tar.gz && \
tar xzvf /tmp/boost.tar.gz && \
cd boost_1_81_0 && \
./bootstrap.sh && \
./b2 install link=static

WORKDIR /home/dependencies
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz && \
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install

WORKDIR /home/dependencies
RUN git clone https://github.com/openssl/openssl.git && \
cd openssl && \
git checkout OpenSSL_1_1_1-stable && \
./config && \
make depend && \
make all

WORKDIR /home/dependencies
RUN git clone --branch v2.13.6 https://github.com/catchorg/Catch2.git && \
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
52 changes: 52 additions & 0 deletions .github/docker-images/base-images/fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM fedora:latest AS base

# Install Prerequisites

RUN dnf -y update \
&& dnf -y install \
git autoconf automake \
which wget libtool libatomic curl make gcc-c++ unzip cmake python3 openssl-devel perl-core

RUN mkdir /home/dependencies

WORKDIR /home/dependencies
RUN wget https://www.zlib.net/zlib-1.2.13.tar.gz -O /tmp/zlib-1.2.13.tar.gz && \
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install

WORKDIR /home/dependencies
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz -O /tmp/boost.tar.gz && \
tar xzvf /tmp/boost.tar.gz && \
cd boost_1_81_0 && \
./bootstrap.sh && \
./b2 install link=static

WORKDIR /home/dependencies
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz && \
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install

WORKDIR /home/dependencies
RUN git clone https://github.com/openssl/openssl.git && \
cd openssl && \
git checkout OpenSSL_1_1_1-stable && \
./config && \
make depend && \
make all

WORKDIR /home/dependencies
RUN git clone --branch v2.13.6 https://github.com/catchorg/Catch2.git && \
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
51 changes: 51 additions & 0 deletions .github/docker-images/base-images/ubi8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM redhat/ubi8:latest AS base

# Install Prerequisites

RUN yum -y update \
&& yum -y install git autoconf automake \
wget libtool libatomic curl make gcc-c++ unzip cmake python3 openssl-devel

RUN mkdir /home/dependencies

WORKDIR /home/dependencies
RUN wget https://www.zlib.net/zlib-1.2.13.tar.gz -O /tmp/zlib-1.2.13.tar.gz && \
tar xzvf /tmp/zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
./configure && \
make && \
make install

WORKDIR /home/dependencies
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz -O /tmp/boost.tar.gz && \
tar xzvf /tmp/boost.tar.gz && \
cd boost_1_81_0 && \
./bootstrap.sh && \
./b2 install link=static

WORKDIR /home/dependencies
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz && \
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz && \
cd protobuf-3.17.3 && \
mkdir build && \
cd build && \
cmake ../cmake && \
make && \
make install

WORKDIR /home/dependencies
RUN git clone https://github.com/openssl/openssl.git && \
cd openssl && \
git checkout OpenSSL_1_1_1-stable && \
./config && \
make depend && \
make all

WORKDIR /home/dependencies
RUN git clone --branch v2.13.6 https://github.com/catchorg/Catch2.git && \
cd Catch2 && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
Loading

0 comments on commit c9a3375

Please sign in to comment.