Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile and Node.js to version 14 #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
./build
./resources
./src
./templates
*.md
deploy.js
LICENSE
Makefile
.gitignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
recording.log
container.env
/recording/node_modules/
./build/
38 changes: 24 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,27 @@ FROM ubuntu:18.04

ENV DEBIAN_FRONTEND noninteractive

RUN /usr/bin/apt-get update && \
/usr/bin/apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
/usr/bin/apt-get update && \
/usr/bin/apt-get upgrade -y && \
/usr/bin/apt-get install -y nodejs pulseaudio xvfb firefox ffmpeg xdotool unzip

COPY /recording /recording
WORKDIR /recording
RUN /usr/bin/npm install && \
chmod +x /recording/run.sh && \
chmod +x /recording/record.js

ENTRYPOINT ["/recording/run.sh"]
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y curl \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get update \
&& apt-get install -y nodejs pulseaudio xvfb firefox ffmpeg xdotool unzip \
&& npm install -g npm \
&& mkdir -p /usr/src

COPY ./recording/package.json /usr/src/package.json
COPY ./recording/package-lock.json /usr/src/package-lock.json

WORKDIR /usr/src

RUN npm install

COPY ./recording /usr/src/

RUN chmod +x ./run.sh \
&& chmod +x ./record.js

ENTRYPOINT ["/bin/bash"]

CMD [ "./run.sh" ]
2 changes: 1 addition & 1 deletion recording/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ firefox \
sleep 0.5 # Ensure this has started before moving on
xdotool mousemove 1 1 click 1 # Move mouse out of the way so it doesn't trigger the "pause" overlay on the video tile

exec node /recording/record.js ${S3_BUCKET_NAME} ${SCREEN_WIDTH} ${SCREEN_HEIGHT}
exec node ./record.js ${S3_BUCKET_NAME} ${SCREEN_WIDTH} ${SCREEN_HEIGHT}