2020-07-09 09:03:49 +00:00
|
|
|
FROM registry.fit2cloud.com/public/python:v3 as stage-build
|
2018-11-13 07:57:44 +00:00
|
|
|
MAINTAINER Jumpserver Team <ibuler@qq.com>
|
2020-07-09 09:03:49 +00:00
|
|
|
ARG VERSION
|
|
|
|
ENV VERSION=$VERSION
|
2018-11-13 07:57:44 +00:00
|
|
|
|
|
|
|
WORKDIR /opt/jumpserver
|
2020-07-09 09:03:49 +00:00
|
|
|
ADD . .
|
|
|
|
RUN cd utils && bash -ixeu build.sh
|
|
|
|
|
|
|
|
|
|
|
|
FROM registry.fit2cloud.com/public/python:v3
|
2020-07-28 11:23:29 +00:00
|
|
|
ARG PIP_MIRROR=https://pypi.douban.com/simple
|
|
|
|
ENV PIP_MIRROR=$PIP_MIRROR
|
|
|
|
ARG MYSQL_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql57-community-el6/
|
|
|
|
ENV MYSQL_MIRROR=$MYSQL_MIRROR
|
|
|
|
|
2020-07-09 09:03:49 +00:00
|
|
|
WORKDIR /opt/jumpserver
|
2018-11-13 07:57:44 +00:00
|
|
|
|
2020-07-28 11:23:29 +00:00
|
|
|
COPY ./requirements ./requirements
|
2020-07-09 09:03:49 +00:00
|
|
|
RUN useradd jumpserver
|
2019-05-21 09:46:39 +00:00
|
|
|
RUN yum -y install epel-release && \
|
2020-07-28 11:23:29 +00:00
|
|
|
echo -e "[mysql]\nname=mysql\nbaseurl=${MYSQL_MIRROR}\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/mysql.repo
|
2020-07-09 09:03:49 +00:00
|
|
|
RUN yum -y install $(cat requirements/rpm_requirements.txt)
|
2020-09-01 05:37:16 +00:00
|
|
|
RUN pip install --upgrade pip setuptools==49.6.0 wheel -i ${PIP_MIRROR} && \
|
2020-07-28 11:23:29 +00:00
|
|
|
pip config set global.index-url ${PIP_MIRROR}
|
2020-10-15 05:50:39 +00:00
|
|
|
RUN pip install $(grep 'jms' requirements/requirements.txt) -i https://pypi.org/simple
|
2020-10-15 06:05:11 +00:00
|
|
|
RUN pip install -r requirements/requirements.txt
|
2020-07-28 11:23:29 +00:00
|
|
|
|
2020-07-29 11:46:45 +00:00
|
|
|
COPY --from=stage-build /opt/jumpserver/release/jumpserver /opt/jumpserver
|
2019-04-02 08:25:39 +00:00
|
|
|
RUN mkdir -p /root/.ssh/ && echo -e "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null" > /root/.ssh/config
|
2018-11-13 07:57:44 +00:00
|
|
|
|
2019-01-17 12:26:47 +00:00
|
|
|
RUN echo > config.yml
|
2018-11-13 07:57:44 +00:00
|
|
|
VOLUME /opt/jumpserver/data
|
|
|
|
VOLUME /opt/jumpserver/logs
|
|
|
|
|
|
|
|
ENV LANG=zh_CN.UTF-8
|
|
|
|
ENV LC_ALL=zh_CN.UTF-8
|
|
|
|
|
2019-09-27 02:36:06 +00:00
|
|
|
EXPOSE 8070
|
2018-11-13 07:57:44 +00:00
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|