|
@@ -1,12 +1,8 @@
|
|
|
FROM python:3.6
|
|
FROM python:3.6
|
|
|
-
|
|
|
|
|
WORKDIR /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
|
-
|
|
|
|
|
COPY . .
|
|
COPY . .
|
|
|
-
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
ENV TZ Asia/Shanghai
|
|
ENV TZ Asia/Shanghai
|
|
|
-
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt && \
|
|
RUN pip install --no-cache-dir -r requirements.txt && \
|
|
|
apt-get update && \
|
|
apt-get update && \
|
|
|
apt-get install -y --force-yes git make gcc g++ autoconf && apt-get clean && \
|
|
apt-get install -y --force-yes git make gcc g++ autoconf && apt-get clean && \
|
|
@@ -16,7 +12,6 @@ RUN pip install --no-cache-dir -r requirements.txt && \
|
|
|
apt-get autoremove -y && \
|
|
apt-get autoremove -y && \
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
|
|
cp ssdb.conf /etc && cd .. && yes | rm -r ssdb && \
|
|
cp ssdb.conf /etc && cd .. && yes | rm -r ssdb && \
|
|
|
-
|
|
|
|
|
mkdir -p /var/lib/ssdb && \
|
|
mkdir -p /var/lib/ssdb && \
|
|
|
sed \
|
|
sed \
|
|
|
-e 's@home.*@home /var/lib@' \
|
|
-e 's@home.*@home /var/lib@' \
|
|
@@ -26,14 +21,10 @@ RUN pip install --no-cache-dir -r requirements.txt && \
|
|
|
-e 's@level:.*@level: info@' \
|
|
-e 's@level:.*@level: info@' \
|
|
|
-e 's@ip:.*@ip: 0.0.0.0@' \
|
|
-e 's@ip:.*@ip: 0.0.0.0@' \
|
|
|
-i /etc/ssdb.conf && \
|
|
-i /etc/ssdb.conf && \
|
|
|
-
|
|
|
|
|
echo "# ! /bin/sh " > /usr/src/app/run.sh && \
|
|
echo "# ! /bin/sh " > /usr/src/app/run.sh && \
|
|
|
echo "cd Run" >> /usr/src/app/run.sh && \
|
|
echo "cd Run" >> /usr/src/app/run.sh && \
|
|
|
echo "/usr/bin/ssdb-server /etc/ssdb.conf &" >> /usr/src/app/run.sh && \
|
|
echo "/usr/bin/ssdb-server /etc/ssdb.conf &" >> /usr/src/app/run.sh && \
|
|
|
echo "python main.py" >> /usr/src/app/run.sh && \
|
|
echo "python main.py" >> /usr/src/app/run.sh && \
|
|
|
-
|
|
|
|
|
chmod 777 run.sh
|
|
chmod 777 run.sh
|
|
|
-
|
|
|
|
|
EXPOSE 5010
|
|
EXPOSE 5010
|
|
|
-
|
|
|
|
|
CMD [ "sh", "run.sh" ]
|
|
CMD [ "sh", "run.sh" ]
|