-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathDockerfile
61 lines (48 loc) · 1.37 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM jrottenberg/ffmpeg:centos
MAINTAINER Paul Visco <[email protected]>
#####################################################################
#
# A Docker image to convert audio and video for web using web API
#
# with
# - Latest FFMPEG (built)
# - NodeJS
# - fluent-ffmpeg
#
# For more on Fluent-FFMPEG, see
#
# https://github.com/fluent-ffmpeg/node-fluent-ffmpeg
#
#####################################################################
# Add the following two dependencies for nodejs
RUN yum install -y git
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum install -y nodejs npm --enablerepo=epel
WORKDIR /usr/local/src
# Custom Builds go here
RUN npm install -g fluent-ffmpeg
# Remove all tmpfile and cleanup
# =================================
WORKDIR /usr/local/
RUN rm -rf /usr/local/src
RUN yum clean all
RUN rm -rf /var/cache/yum
# =================================
# Setup a working directory to allow for
# docker run --rm -ti -v ${PWD}:/work ...
# =======================================
WORKDIR /work
# Make sure Node.js is installed
RUN node -v
RUN npm -v
#Create app dir
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
#Install Dependencies
COPY package.json /usr/src/app
RUN npm install
#Bundle app source
COPY . /usr/src/app
EXPOSE 3000
ENTRYPOINT []
CMD [ "node", "app.js" ]