File size: 507 Bytes
8d9368a
 
df51516
8d9368a
 
 
 
 
 
 
 
df51516
8d9368a
 
 
 
 
 
 
 
 
 
df51516
 
8d9368a
df51516
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
# 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"]