c8b8c580ae
User inside the container images for logscraper and loggearman is setting lowest value that is set in the system which is 1000. This uid and gid is provided for other user and the services should be running with different uids/gids. In that case, the logscraper service gid/uid is 10210 and loggearman gid/uid is set to 10211. Change-Id: Ida0e2ceaf341fb7cbea18f3eaf161daa836e8ea7
41 lines
1.3 KiB
Docker
41 lines
1.3 KiB
Docker
# Copyright (C) 2021 Red Hat
|
|
# Copyright (C) 2022 Red Hat
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
FROM quay.io/centos/centos:stream8
|
|
|
|
ENV PATH=/workspace/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
RUN groupadd logscraper --gid 1000 && \
|
|
useradd --home-dir /home/logscraper --gid 1000 --uid 1000 logscraper
|
|
|
|
RUN dnf update -y && \
|
|
dnf install -y python38 python38-setuptools \
|
|
python38-devel python38-wheel \
|
|
python38-pip git
|
|
|
|
COPY . /tmp/src
|
|
RUN cd /tmp/src && \
|
|
pip3 install -r requirements.txt && \
|
|
python3 setup.py install && \
|
|
rm -rf /tmp/src
|
|
|
|
RUN dnf remove -y python3-devel git && \
|
|
dnf autoremove -y && \
|
|
dnf clean all && \
|
|
rm -rf ~/.cache/pip
|
|
|
|
USER logscraper
|
|
ENTRYPOINT ["/usr/local/bin/logscraper"]
|