# Use an official Ubuntu base image FROM ubuntu:latest # Install dependencies RUN apt-get update && \ apt-get install -y \ build-essential \ cmake \ git \ libjson-c-dev \ libwebsockets-dev # Clone the ttyd repository and build it RUN git clone https://github.com/tsl0922/ttyd.git && \ cd ttyd && \ mkdir build && \ cd build && \ cmake .. && \ make && \ make install # Expose the port ttyd will run on EXPOSE 7681 # Command to run ttyd CMD ["ttyd", "bash"]