forked from user-cont/release-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM registry.fedoraproject.org/fedora:29
ENV STI_SCRIPTS_URL=image:///usr/libexec/s2i \
STI_SCRIPTS_PATH=/usr/libexec/s2i \
# The $HOME is not set by default, but some applications needs this variable
HOME=/opt/app-root/src \
PATH=/opt/app-root/src/bin:/opt/app-root/bin:/opt/app-root/src/.local/bin:$PATH
LABEL summary="Automated releasing from GitHub repositories" \
name="release-bot" \
description="Automated releasing from GitHub repositories" \
io.k8s.description="Automated releasing from GitHub repositories" \
io.k8s.display-name="Release Bot" \
io.openshift.tags="builder" \
io.openshift.s2i.scripts-url="$STI_SCRIPTS_URL" \
usage="s2i build <CONFIGURATION-REPOSITORY> usercont/release-bot <APP-NAME>"
RUN dnf install -y git nss_wrapper
RUN mkdir -p ${HOME} && \
useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \
-c "Default Application User" default && \
chown -R 1001:0 /opt/app-root
USER 1001
RUN pip3 install --user release-bot && \
chgrp -R 0 /opt/app-root && \
chmod -R g=u /opt/app-root
# S2I scripts
COPY ./.s2i/bin/ $STI_SCRIPTS_PATH
WORKDIR $HOME
CMD $STI_SCRIPTS_PATH/usage