jumpserver/Dockerfile

36 lines
1.1 KiB
Docker
Raw Normal View History

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
WORKDIR /opt/jumpserver
COPY --from=stage-build /opt/jumpserver/release/jumpserver /opt/jumpserver
2018-11-13 07:57:44 +00:00
2020-07-09 09:03:49 +00:00
RUN useradd jumpserver
2018-11-13 07:57:44 +00:00
2019-05-21 09:46:39 +00:00
RUN yum -y install epel-release && \
echo -e "[mysql]\nname=mysql\nbaseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql57-community-el6/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/mysql.repo
2020-07-09 09:03:49 +00:00
COPY . .
RUN yum -y install $(cat requirements/rpm_requirements.txt)
RUN pip install --upgrade pip setuptools && pip install wheel && \
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements/requirements.txt || pip install -r requirements/requirements.txt
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"]