-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (19 loc) · 760 Bytes
/
Dockerfile
File metadata and controls
28 lines (19 loc) · 760 Bytes
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
FROM debian:trixie-slim
RUN apt update && apt install -y nano curl gettext caddy mosquitto mosquitto-clients
RUN apt install -y git
# install nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
# set env
ENV NVM_DIR=/root/.nvm
# install node
ARG NODE_VERSION=20
RUN bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"
# set ENTRYPOINT for reloading nvm-environment
ENTRYPOINT ["bash", "-c", "source $NVM_DIR/nvm.sh && exec \"$@\"", "--"]
# set cmd to bash
CMD ["/bin/bash"]
WORKDIR /home/www
RUN bash -c "source $NVM_DIR/nvm.sh && npm install mqtt"
ARG UPDATE_VDEV=1
RUN bash -c "source $NVM_DIR/nvm.sh && npm install git+https://github.com/LD2Studio/VirtualDev.git#dev"
COPY examples/ /home/www/examples