# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

FROM openeuler/openeuler:22.03

MAINTAINER Cao Xueliang <caoxl78320@163.com>

COPY openEuler.repo /etc/yum.repos.d/

RUN yum update && \
	yum install -y ca-certificates python3-3.9.9 shadow && \
	yum install -y ruby git util-linux cpio g++ gcc pcre && \
	yum install -y libevent make ruby-devel python3-pip hostname rpm-build wget

RUN gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \
	gem install -f git activesupport:6.1.4.4 rest-client faye-websocket md5sum base64 elasticsearch:7.11.1 && \
	groupadd -g 1090 lkp && useradd -m -u 1090 -g 1090 lkp

ENV PIP_SOURCE https://mirrors.huaweicloud.com/repository/pypi/simple/

COPY requirements.txt .

RUN umask 002 && pip3 install -r ./requirements.txt -i ${PIP_SOURCE}
