File size: 762 Bytes
7ad5d41
 
 
 
 
 
 
 
 
 
75c5ea2
 
 
7ad5d41
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM ubuntu:22.04

# Set up environment
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y wget ca-certificates curl

# Create user and data directories
RUN useradd -m -u 1000 user
RUN mkdir -p /data/.cli-proxy-api && chown -R user:user /data

# Download and install CLIProxyAPI 
RUN wget https://github.com/router-for-me/CLIProxyAPI/releases/download/v6.7.47/CLIProxyAPI_6.7.47_linux_amd64.tar.gz \
    && tar -xzvf CLIProxyAPI_6.7.47_linux_amd64.tar.gz \
    && mv cli-proxy-api /usr/local/bin/ \
    && chmod +x /usr/local/bin/cli-proxy-api

USER user
WORKDIR /home/user

# Copy your local config.yaml to the container
COPY --chown=user:user config.yaml .

EXPOSE 7860

# Start command
CMD ["cli-proxy-api", "--config", "config.yaml"]