forked from fabric8-services/fabric8-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.deploy
31 lines (24 loc) · 1.06 KB
/
Dockerfile.deploy
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
FROM centos:7
LABEL maintainer "Devtools <[email protected]>"
LABEL author "Konrad Kleine <[email protected]>"
ENV LANG=en_US.utf8
ENV AUTH_INSTALL_PREFIX=/usr/local/auth
# Create a non-root user and a group with the same name: "auth"
ENV AUTH_USER_NAME=auth
RUN useradd --no-create-home -s /bin/bash ${AUTH_USER_NAME}
COPY bin/auth ${AUTH_INSTALL_PREFIX}/bin/auth
COPY config.yaml ${AUTH_INSTALL_PREFIX}/etc/config.yaml
# Install little pcp pmcd server for metrics collection
# would prefer only pmcd, and not the /bin/pm*tools etc.
COPY pcp.repo /etc/yum.repos.d/pcp.repo
RUN yum install -y pcp pcp-pmda-prometheus && yum clean all && \
mkdir -p /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chgrp -R root /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chmod -R g+rwX /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp
COPY ./auth+pmcd.sh /auth+pmcd.sh
EXPOSE 44321
# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${AUTH_USER_NAME}
WORKDIR ${AUTH_INSTALL_PREFIX}
ENTRYPOINT [ "/auth+pmcd.sh" ]
EXPOSE 8089