问题描述
下面创建了这个docker镜像。我想在不重新启动容器的情况下重新启动Tor。我该怎么办?
Docker映像:
# set alpine as the base image of the Dockerfile
FROM alpine:edge
# update the package repository and install Tor
RUN apk update
RUN apk upgrade --no-cache
RUN apk add --no-cache tor
RUN apk add --no-cache bash
RUN apk add --no-cache build-base
RUN apk add --no-cache python3
RUN apk add --no-cache python3-dev
RUN apk add py3-pip
RUN pip3 install --no-cache-dir --upgrade pip
RUN apk add --no-cache openrc
# python library
RUN pip3 install Flask
# Copy over the torrc created above and set the owner to `tor`
RUN echo "Log notice stdout" >> /etc/tor/torrc
RUN echo "SocksPort 0.0.0.0:9050" >> /etc/tor/torrc
RUN chown -R tor /etc/tor
COPY ./app.py /app.py
# RUN echo "tor -f /etc/tor/torrc &" >> /start.sh
RUN echo "rc-service tor start" >> /start.sh
RUN echo "python3 app.py" >> /start.sh
RUN chmod +x /start.sh
EXPOSE 8000
EXPOSE 9050
# Set the default container command
# This can be overridden later when running a container
ENTRYPOINT [ "/bin/bash" ]
CMD [ "/start.sh" ]
app.py是我要从那里重新启动tor的rest api代码
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)