2021-11-02 16:54:10 +03:00
|
|
|
# Filename: Dockerfile
|
|
|
|
|
2022-05-21 23:29:40 +03:00
|
|
|
FROM node:slim
|
2021-11-02 16:54:10 +03:00
|
|
|
|
|
|
|
#Add non-root user, add installation directories and assign proper permissions
|
|
|
|
RUN mkdir -p /opt/meshcentral
|
|
|
|
|
|
|
|
#meshcentral installation
|
|
|
|
WORKDIR /opt/meshcentral
|
|
|
|
|
|
|
|
RUN npm install meshcentral
|
|
|
|
|
2021-12-13 00:04:21 +03:00
|
|
|
#Install dependencies for plugins
|
|
|
|
RUN npm install nedb
|
|
|
|
|
2021-11-02 17:31:56 +03:00
|
|
|
COPY config.json.template /opt/meshcentral/config.json.template
|
|
|
|
COPY startup.sh startup.sh
|
2021-11-02 16:54:10 +03:00
|
|
|
#environment variables
|
|
|
|
|
|
|
|
EXPOSE 80 443
|
|
|
|
|
|
|
|
#volumes
|
|
|
|
VOLUME /opt/meshcentral/meshcentral-data
|
|
|
|
VOLUME /opt/meshcentral/meshcentral-files
|
|
|
|
|
|
|
|
CMD ["bash","/opt/meshcentral/startup.sh"]
|