├── .gitignore ├── Dockerfile ├── Makefile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazonlinux:2018.03 2 | LABEL authors="Bubba Hines " 3 | LABEL vendor="Signature Tech Studio, Inc." 4 | LABEL home="https://github.com/stechstudio/aws-lambda-build" 5 | 6 | WORKDIR /root 7 | 8 | # Lambda is based on 2017.03. Lock YUM to that release version. 9 | RUN sed -i 's/releasever=latest/releaserver=2018.03/' /etc/yum.conf 10 | 11 | RUN yum makecache \ 12 | && yum groupinstall -y "Development Tools" --setopt=group_package_types=mandatory,default \ 13 | && yum install -y jq \ 14 | zsh \ 15 | wget \ 16 | fuse \ 17 | gperf \ 18 | expect \ 19 | gtk-doc \ 20 | texlive \ 21 | python35 \ 22 | gmp-devel \ 23 | docbook2X \ 24 | findutils \ 25 | python35-pip \ 26 | dockbook-utils-pdf \ 27 | readline-devel \ 28 | gettext-devel \ 29 | libicu-devel \ 30 | && yum clean all 31 | 32 | # Install Ninja and Meson 33 | RUN curl -Ls https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip >> /tmp/ninja.zip \ 34 | && cd /tmp && unzip /tmp/ninja.zip \ 35 | && cp /tmp/ninja /usr/local/bin \ 36 | && /usr/bin/pip-3.5 install meson 37 | 38 | # Install the rust toolchain 39 | RUN curl https://sh.rustup.rs -sSf | sh -s -- -y 40 | 41 | # We need a newer cmake than is available, so lets build it ourselves. 42 | RUN mkdir -p /tmp/cmake \ 43 | && cd /tmp/cmake \ 44 | && curl -Ls https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3.tar.gz | tar xzC /tmp/cmake --strip-components=1 \ 45 | && ./bootstrap --prefix=/usr/local \ 46 | && make \ 47 | && make install 48 | 49 | # Install neovim 50 | ADD https://github.com/neovim/neovim/releases/download/v0.4.2/nvim.appimage /root 51 | RUN chmod 755 /root/nvim.appimage && /root/nvim.appimage --appimage-extract 52 | RUN ln -s /root/squashfs-root/usr/bin/nvim /usr/local/bin/nvim 53 | 54 | # Set some sane environment variables for ourselves 55 | ENV \ 56 | PKG_CONFIG="/usr/bin/pkg-config" \ 57 | SOURCEFORGE_MIRROR="netix" \ 58 | PATH="/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ 59 | JQ="/usr/bin/jq" \ 60 | CMAKE='/usr/local/bin/cmake' \ 61 | MESON='/usr/local/bin/meson' \ 62 | NINJA='/usr/local/bin/ninja' 63 | 64 | ENTRYPOINT ["/bin/zsh"] 65 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | .DEFAULT_GOAL := image 3 | 4 | image: 5 | docker build -t stechstudio/aws-lambda-build:latest . 6 | 7 | container: image 8 | docker run --interactive --tty -v ${PWD}:/export -e "TERM=xterm-256color" stechstudio/aws-lambda-build:latest -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | The [AWS Lambda Execution Environment and Available Libraries](http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html) documents the current AWS Lambda environment. In order to run native binaries in our Lambda functions, we must ensure they are compiled in a compatible environment. 3 | 4 | This Docker image is based on **ami-6869aa05** (a.k.a *amzn-ami-hvm-2016.03.3.x86_64-gp2)* and includes the development tools necessary to build executables. 5 | 6 | ## Requirments 7 | You are going to need [Docker](https://www.docker.com/) installed. You can find a variety of installation instructions, per operating system, in the [Docker Installation Docs](https://docs.docker.com/installation/#installation). If you haven't used Docker before, take a moment and look through the [Docker User Guide](https://docs.docker.com/userguide/). 8 | 9 | ## Pull The Docker Repository 10 | `docker pull stechstudio/aws-lambda-build` 11 | 12 | ## Yum Repositories 13 | The image uses the same Amazon YUM Repositories that the AMI image would use in EC2. 14 | 15 | ## In the Image 16 | The following libraries are available in the AWS Lambda execution environment, regardless of the supported runtime you use, so you don't need to include them: 17 | 18 | - AWS SDK – AWS SDK for JavaScript version 2.45.0 19 | - AWS SDK for Python (Boto 3) version 1.4.4, Botocore version 1.5.43 20 | - Amazon Linux build of java-1.8.0-openjdk for Java. 21 | 22 | ### Development Tools 23 | - advdef 24 | - autoconf 25 | - automake 26 | - binutils 27 | - bison 28 | - byacc 29 | - crash 30 | - cscope 31 | - ctags 32 | - cvs 33 | - diffstat 34 | - doxygen 35 | - elfutils 36 | - flex 37 | - gcc 38 | - gcc-c++ 39 | - gcc-gfortran 40 | - gdb 41 | - gettext 42 | - git 43 | - indent 44 | - intltool 45 | - kexec-tools 46 | - latrace 47 | - libtool 48 | - ltrace 49 | - make 50 | - patch 51 | - patchutils 52 | - pkgconfig 53 | - rcs 54 | - rpm-build 55 | - strace 56 | - subversion 57 | - swig 58 | - system-rpm-config 59 | - systemtap 60 | - systemtap-runtime 61 | - texinfo 62 | - valgrind 63 | --------------------------------------------------------------------------------