-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.sync_service
39 lines (30 loc) · 1.11 KB
/
Dockerfile.sync_service
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
# Use the official Ubuntu image as the base image
FROM ubuntu:latest
# Set the working directory inside the container
WORKDIR /app
# Install curl, build-essential, pkg-config, and other dependencies
RUN apt-get update && apt-get install -y \
curl \
build-essential \
libsecret-1-dev \
pkg-config \
dbus \
dbus-x11 \
&& rm -rf /var/lib/apt/lists/*
# Generate the machine-id
RUN dbus-uuidgen > /etc/machine-id
# Disable D-Bus autolaunching to avoid X11 errors
ENV DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
# Install Node.js 20
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest
# Copy the current directory contents into the container at /app
COPY . .
# Install any needed packages specified in package.json
RUN npm install
RUN npm i datalayer-driver-linux-x64-gnu
# Expose the port the app runs on (if necessary)
EXPOSE 4159
# Start D-Bus in the background and then run the application
CMD (dbus-daemon --session --fork) && npm run start-propagation-server