kopia lustrzana https://github.com/meshtastic/firmware
meshtasticd docker: Support webui (#6482)
rodzic
1b1d4625aa
commit
0d800b7a22
11
Dockerfile
11
Dockerfile
|
@ -12,7 +12,7 @@ ENV TZ=Etc/UTC
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
ENV PIP_ROOT_USER_ACTION=ignore
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
wget g++ zip git ca-certificates \
|
curl wget g++ zip git ca-certificates \
|
||||||
libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \
|
libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \
|
||||||
libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config \
|
libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
||||||
|
@ -27,6 +27,12 @@ COPY . /tmp/firmware
|
||||||
RUN bash ./bin/build-native.sh && \
|
RUN bash ./bin/build-native.sh && \
|
||||||
cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd"
|
cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd"
|
||||||
|
|
||||||
|
# Fetch web assets
|
||||||
|
RUN curl -L "https://github.com/meshtastic/web/releases/download/v$(cat /tmp/firmware/bin/web.version)/build.tar" -o /tmp/web.tar \
|
||||||
|
&& mkdir -p /tmp/web \
|
||||||
|
&& tar -xf /tmp/web.tar -C /tmp/web/ \
|
||||||
|
&& gzip -dr /tmp/web \
|
||||||
|
&& rm /tmp/web.tar
|
||||||
|
|
||||||
##### PRODUCTION BUILD #############
|
##### PRODUCTION BUILD #############
|
||||||
|
|
||||||
|
@ -46,6 +52,7 @@ RUN apt-get update && apt-get --no-install-recommends -y install \
|
||||||
|
|
||||||
# Fetch compiled binary from the builder
|
# Fetch compiled binary from the builder
|
||||||
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/
|
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/
|
||||||
|
COPY --from=builder /tmp/web /usr/share/meshtasticd/
|
||||||
# Copy config templates
|
# Copy config templates
|
||||||
COPY ./bin/config.d /etc/meshtasticd/available.d
|
COPY ./bin/config.d /etc/meshtasticd/available.d
|
||||||
|
|
||||||
|
@ -54,6 +61,8 @@ VOLUME /var/lib/meshtasticd
|
||||||
|
|
||||||
# Expose Meshtastic TCP API port from the host
|
# Expose Meshtastic TCP API port from the host
|
||||||
EXPOSE 4403
|
EXPOSE 4403
|
||||||
|
# Expose Meshtastic Web UI port from the host
|
||||||
|
EXPOSE 443
|
||||||
|
|
||||||
CMD [ "sh", "-cx", "meshtasticd -d /var/lib/meshtasticd" ]
|
CMD [ "sh", "-cx", "meshtasticd -d /var/lib/meshtasticd" ]
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue