[mirotalksfu] - lighter docker container

هذا الالتزام موجود في:
Laurent Goussard
2022-06-05 17:22:53 +02:00
الأصل 7ddd65a081
التزام 80e4480f0d
3 ملفات معدلة مع 26 إضافات و42 حذوفات

عرض الملف

@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM node:latest
WORKDIR /src
@@ -9,31 +9,5 @@ RUN \
# Python 3.8 and pip
RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
apt install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt update && \
apt install -y python3.8 python3-pip
# NodeJS 16.X and npm
RUN \
apt install -y curl dirmngr apt-transport-https lsb-release ca-certificates && \
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm@latest
# Vim editor
RUN apt-get install -y vim
COPY package.json .
RUN npm install
COPY app app
COPY public public
EXPOSE 3010/tcp
EXPOSE 40000-40100/tcp
EXPOSE 40000-40100/udp
CMD npm start
apt install -y python3-pip

عرض الملف

@@ -117,8 +117,8 @@ $ npm start
$ cp app/src/config.template.js app/src/config.js
# Copy docker-compose.template.yml in docker-compose.yml and edit it if needed
$ cp docker-compose.template.yml docker-compose.yml
# Build or rebuild services - be patient, the first time will take a few minutes, in the meantime have a good coffee ;)
$ docker-compose build
# Build image and install dependencies
$ docker-compose run --rm npm install
# Create and start containers
$ docker-compose up # -d
# Stop and remove resources

عرض الملف

@@ -1,15 +1,25 @@
version: '3'
services:
mirotalksfu:
image: mirotalksfu:latest
build:
context: .
dockerfile: Dockerfile
container_name: mirotalksfu
hostname: mirotalksfu
restart: unless-stopped
ports:
- '3010:3010/tcp'
- '40000-40100:40000-40100/tcp'
- '40000-40100:40000-40100/udp'
npm: &npm
image: mirotalksfu-npm:latest
build:
context: .
dockerfile: Dockerfile
container_name: mirotalksfu-npm
volumes:
- .:/src/
command: -v
entrypoint: ['npm']
mirotalksfu:
<<: *npm
container_name: mirotalksfu
hostname: mirotalksfu
restart: unless-stopped
ports:
- '3010:3010/tcp'
- '40000-40100:40000-40100/tcp'
- '40000-40100:40000-40100/udp'
command: start