Created
January 30, 2022 22:41
-
-
Save AndyShor/a0e6eea36aa82890a127c613079a5724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUN cd /var/task &&\ | |
mkdir build &&\ | |
cd build &&\ | |
curl -LO https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm &&\ | |
rpm -i epel-release-${EPEL_VERSION}.noarch.rpm &&\ | |
yum install ghc -y &&\ | |
curl -LO https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-x86_64-centos70-linux.tar.xz &&\ | |
tar xf ghc-${GHC_VERSION}-x86_64-centos70-linux.tar.xz && \ | |
rm ghc-${GHC_VERSION}-x86_64-centos70-linux.tar.xz && \ | |
cd ghc* &&\ | |
./configure --prefix=/usr/local &&\ | |
make install && \ | |
cd .. &&\ | |
curl -LO https://downloads.haskell.org/cabal/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz &&\ | |
tar xf cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz &&\ | |
mv cabal /usr/local/bin &&\ | |
cabal update &&\ | |
cabal sandbox init --sandbox . &&\ | |
cabal install --disable-documentation --force-reinstalls pandoc-2.7.2 -fembed_data_files &&\ | |
mkdir -p ${TARGET_DIR}bin &&\ | |
cp bin/pandoc ${TARGET_DIR}bin && \ | |
pip3 install requests --target ${FUNCTION_DIR} &&\ | |
pip3 install boto3 --target ${FUNCTION_DIR} &&\ | |
pip3 install --target ${FUNCTION_DIR} awslambdaric &&\ | |
mkdir -p ${FUNCTION_DIR}/.aws-lambda-rie &&\ | |
curl -Lo ${FUNCTION_DIR}/.aws-lambda-rie/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie &&\ | |
chmod +x ${FUNCTION_DIR}/.aws-lambda-rie/aws-lambda-rie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment