-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 1.75 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
FROM node:20.18.0-bullseye AS frontend-builder
COPY ./frontend /frontend
WORKDIR /frontend
RUN npm cache clean --force && npm install --legacy-peer-deps && npm run build && rm -rf node_modules
FROM python:3.11.10-slim-bullseye AS runtime
USER root
WORKDIR /home/pi/cellphone_modem_manager/app
COPY ./backend ./
# Install build dependencies for commonwealth and psutil, then remove them after pip install
RUN apt-get update && \
apt-get install -y gcc libc-dev && \
pip3 install . && \
rm -rf dist build cellphone_modem_manager.egg-info && \
apt-get remove -y gcc libc-dev && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
COPY --from=frontend-builder /frontend/dist /home/pi/cellphone_modem_manager/app/api/static
EXPOSE 20038/tcp
# For manifest generation
LABEL version="0.1.0"
LABEL permissions='{ "ExposedPorts": { "20038/tcp": {} }, "HostConfig": { "Privileged": true, "Binds":["/root/.config:/root/.config", "/dev:/dev:rw"], "ExtraHosts":["blueos.internal:host-gateway"], "PortBindings": { "20038/tcp": [ { "HostPort": "" } ] } } }'
LABEL authors='[{ "name": "João Mário Lago", "email": "[email protected]" }, { "name": "Willian Galvani", "email": "[email protected]" }, { "name": "Patrick J. Pereira", "email": "[email protected]" }]'
LABEL company='{ "about": "", "name": "Blue Robotics", "email": "[email protected]" }'
LABEL type="device-integration"
LABEL readme='https://raw.githubusercontent.com/bluerobotics/cellphone-modem-manager/{tag}/README.md'
LABEL links='{ "website": "https://raw.githubusercontent.com/bluerobotics/cellphone-modem-manager/", "support": "https://raw.githubusercontent.com/bluerobotics/cellphone-modem-manager/" }'
LABEL requirements="core >= 1.3"
ENTRYPOINT ["python3", "main.py"]