forked from jasonacox/tinytuya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (36 loc) · 939 Bytes
/
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
38
39
40
41
42
43
44
45
46
# Python base
FROM python:3.10
# Set the working directory
WORKDIR /app
# Update default packages
RUN apt-get update
# Get Ubuntu packages
RUN apt-get install -y \
build-essential \
curl
# Update new packages
RUN apt-get update
# Get Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install dependencies
COPY entrypoint.sh /bin/entrypoint.sh
RUN curl https://sh.rustup.rs -sSf |sh -s -- -y
RUN pip3 install --no-cache-dir tinytuya
# Allow UDP traffic 6666, 6667 and 7000
EXPOSE 6666/udp
EXPOSE 6667/udp
EXPOSE 7000/udp
# Run the application bash entrypoint.sh
ENTRYPOINT ["/bin/entrypoint.sh"]
# Example Docker build
# docker build -t jasonacox/tinytuya-cli:latest .
# Example Docker run but with host network
# docker run \
# -it --rm \
# -p 6666:6666/udp \
# -p 6667:6667/udp \
# -p 7000:7000/udp \
# -v $(pwd):/app \
# --name tinytuya-cli \
# jasonacox/tinytuya-cli:latest