Skip to content

Instantly share code, notes, and snippets.

@adatta02
Last active June 1, 2022 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adatta02/a2cebb9105051a526ce3f8b2c1cb16b5 to your computer and use it in GitHub Desktop.
Save adatta02/a2cebb9105051a526ce3f8b2c1cb16b5 to your computer and use it in GitHub Desktop.
FROM ubuntu:focal-20210921
WORKDIR /app
# Ensures tzinfo doesn't ask for region info.
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
unzip curl \
dumb-init \
xvfb \
cmake \
autoconf \
build-essential \
libtool \
libxi-dev \
libglu1-mesa-dev \
libglew-dev \
pkg-config \
libcurl4-openssl-dev \
&& apt-get -y autoclean
# Source: https://gist.github.com/remarkablemark/aacf14c29b3f01d6900d13137b21db3a
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs
# confirm installation
RUN node -v
RUN npm -v
## INSTALL EDITLY
# ## Install app dependencies
COPY package.json /app/
RUN npm install
# Add app source
COPY . /app
# Ensure `editly` binary available in container
RUN npm link
RUN tar -xvf ffmpeg-release-amd64-static.tar.xz
ENV PATH /app/ffmpeg-4.4-amd64-static:$PATH
ENTRYPOINT ["/app/lambdaEntrypoint.sh"]
CMD ["app.handler"]
#!/usr/bin/bash
xvfb-run -e /dev/stdout -s "-screen 0 1280x1024x24 -ac -nolisten tcp -nolisten unix" /usr/bin/npx aws-lambda-ric app.handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment