socat-porxy / Dockerfile
sanjay7178's picture
Update Dockerfile
92779c8 verified
raw
history blame contribute delete
455 Bytes
# Use Ubuntu as the base image
FROM ubuntu:latest
# Install socat
RUN apt-get update && \
apt-get install -y socat && \
apt-get clean
# Create the socat proxy script
RUN echo '#!/bin/sh\n\
socat -d -d TCP4-LISTEN:7860,reuseaddr,fork \
OPENSSL:115.244.41.198:7860,verify=0' \
> /usr/local/bin/start-proxy.sh && chmod +x /usr/local/bin/start-proxy.sh
# Expose the port
EXPOSE 7860
# Run the socat proxy
CMD ["/usr/local/bin/start-proxy.sh"]