Skip to content

Commit

Permalink
change dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
smka committed Jul 10, 2023
1 parent b3625f6 commit 8b14eeb
Showing 1 changed file with 31 additions and 59 deletions.
90 changes: 31 additions & 59 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,61 +1,33 @@
FROM jrottenberg/ffmpeg:4.3.1-ubuntu1804

WORKDIR /app

# Ensures tzinfo doesn't ask for region info.
ENV DEBIAN_FRONTEND noninteractive

## INSTALL NODE VIA NVM

RUN apt-get update && apt-get install -y \
dumb-init \
xvfb

# 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

# update the repository sources list
# and install dependencies
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get -y autoclean

# nvm environment variables
ENV NVM_VERSION 0.37.2
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 14.4.0

# install nvm
# https://github.com/creationix/nvm#install-script
RUN mkdir -p $NVM_DIR \
&& curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v${NVM_VERSION}/install.sh | bash

# install node and npm
RUN source ${NVM_DIR}/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default

# add node and npm to path so the commands are available
ENV NODE_PATH ${NVM_DIR}/v${NODE_VERSION}/lib/node_modules
ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin:$PATH

# 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
FROM node:lts-bullseye
MAINTAINER EasyPi Software Foundation

ARG EDITLY_VERSION=0.14.2
ARG FFMPEG_VERSION=6.0

WORKDIR /editly
COPY . /editly/

RUN set -xe \
&& apt update \
&& apt install -y curl dumb-init fonts-noto-cjk xvfb xz-utils \
&& curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz \
| tar xJC /usr/bin/ ffmpeg-${FFMPEG_VERSION}-amd64-static/ffprobe ffmpeg-${FFMPEG_VERSION}-amd64-static/ffmpeg --strip 1 \
&& ffmpeg -version \
&& ffprobe -version \
&& rm -rf /var/lib/apt/lists/*

RUN set -xe \
&& apt update \
&& apt install -y build-essential libglu1-mesa-dev libglew-dev pkg-config libxext-dev libxi-dev xserver-xorg-dev \
libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& npm install \
&& npm install --global --unsafe-perm \
&& npm link
# && apt remove -y libxext-dev libxi-dev xserver-xorg-dev \
# && rm -rf /var/lib/apt/lists/*

WORKDIR /data

ENTRYPOINT ["/usr/bin/dumb-init", "--", "xvfb-run", "--server-args", "-screen 0 1280x1024x24 -ac"]
CMD [ "editly" ]
CMD ["editly"]

0 comments on commit 8b14eeb

Please sign in to comment.