Permalink
Switch branches/tags
Nothing to show
Find file Copy path
dfc654a Jan 2, 2018
2 contributors

Users who have contributed to this file

@tchughesiv @rflorenc
38 lines (33 sloc) 1.31 KB
FROM centos:centos7
MAINTAINER Red Hat Systems Engineering <refarch-feedback@redhat.com>
### Atomic/OpenShift Labels - https://github.com/projectatomic/ContainerApplicationGenericLabels
LABEL name="acme/starter-arbitrary-uid" \
maintainer="refarch-feedback@redhat.com" \
vendor="Acme Corp" \
version="3.7" \
release="1" \
summary="Acme Corp's Starter app" \
description="Starter app will do ....." \
### Required labels above - recommended below
url="https://www.acme.io" \
run='docker run -tdi --name ${NAME} \
-u 123456 \
${IMAGE}' \
io.k8s.description="Starter app will do ....." \
io.k8s.display-name="Starter app" \
io.openshift.expose-services="" \
io.openshift.tags="acme,starter-arbitrary-uid,starter,arbitrary,uid"
### Setup user for build execution and application runtime
ENV APP_ROOT=/opt/app-root
ENV PATH=${APP_ROOT}/bin:${PATH} HOME=${APP_ROOT}
COPY bin/ ${APP_ROOT}/bin/
RUN chmod -R u+x ${APP_ROOT}/bin && \
chgrp -R 0 ${APP_ROOT} && \
chmod -R g=u ${APP_ROOT} /etc/passwd
### Containers should NOT run as root as a good practice
USER 10001
WORKDIR ${APP_ROOT}
### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments
ENTRYPOINT [ "uid_entrypoint" ]
VOLUME ${APP_ROOT}/logs ${APP_ROOT}/data
CMD run