[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 WORKDIR /src
@@ -9,31 +9,5 @@ RUN \
# Python 3.8 and pip # Python 3.8 and pip
RUN \ RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
apt install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt update && \ apt update && \
apt install -y python3.8 python3-pip apt install -y 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

عرض الملف

@@ -117,8 +117,8 @@ $ npm start
$ cp app/src/config.template.js app/src/config.js $ cp app/src/config.template.js app/src/config.js
# Copy docker-compose.template.yml in docker-compose.yml and edit it if needed # Copy docker-compose.template.yml in docker-compose.yml and edit it if needed
$ cp docker-compose.template.yml docker-compose.yml $ 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 ;) # Build image and install dependencies
$ docker-compose build $ docker-compose run --rm npm install
# Create and start containers # Create and start containers
$ docker-compose up # -d $ docker-compose up # -d
# Stop and remove resources # Stop and remove resources

عرض الملف

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