-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
39 lines (35 loc) · 891 Bytes
/
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
# syntax=docker/dockerfile:1
FROM node:18-bullseye-slim
LABEL maintainer="karl@oyamist.com"
RUN apt-get update && apt-get upgrade -y
SHELL [ "/bin/bash", "-c" ]
ENV INSTALL="apt-get --no-install-recommends install -y "
RUN <<TOOLS
$INSTALL sudo
$INSTALL procps # ps commmand
$INSTALL ripgrep # faster than grep
$INSTALL git
$INSTALL apache2-utils # rotatelogs
git config --global pull.rebase true
apt-get install -y --reinstall ca-certificates
TOOLS
RUN <<AUDIO
$INSTALL opus-tools
$INSTALL ffmpeg
AUDIO
ENV USER=node
USER $USER
ENV APPDIR=/home/$USER/scv-server/
WORKDIR $APPDIR
COPY --link --chown=$USER package* $APPDIR
RUN <<SCV_SERVER
mkdir -p $APPDIR/local
cd $APPDIR
npm install --production
echo "cd $APPDIR" >> ~/.bashrc
SCV_SERVER
COPY --link --chown=$USER . $APPDIR
# Start application server
ENV START=start:8080
EXPOSE 8080
CMD npm run $START