-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 797 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 797 Bytes
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
# Developer: Maik Ellerbrock <opensource@frapsoft.com>
#
# GitHub: https://github.com/ellerbrock
# Twitter: https://twitter.com/frapsoft
# Docker: https://hub.docker.com/u/ellerbrock
FROM python:2.7-alpine
LABEL com.frapsoft.maintainer="Maik Ellerbrock" \
com.frapsoft.version="0.0.1"
ARG SERVICE_USER
ARG SERVICE_HOME
ENV SERVICE_USER ${SERVICE_USER:-custodian}
ENV SERVICE_HOME ${SERVICE_HOME:-/${SERVICE_USER}}
RUN \
adduser -h ${SERVICE_HOME} -s /sbin/nologin -u 1000 -D ${SERVICE_USER} && \
pip install virtualenv && \
virtualenv --python=python2 custodian && \
. custodian/bin/activate && \
pip install c7n
ENV PATH "/${SERVICE_USER}/bin:${PATH}"
USER ${SERVICE_USER}
WORKDIR ${SERVICE_HOME}
VOLUME ${SERVICE_HOME}
ENTRYPOINT [ "custodian" ]
CMD [ "--help" ]