forked from the-berta-project/berta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (24 loc) · 852 Bytes
/
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
FROM ubuntu:16.04
ARG branch=master
ARG version
ENV name="berta"
ENV spoolDir="/var/spool/${name}"
ENV templateDir="${spoolDir}/template/" \
logDir="/var/log/${name}"
LABEL application=${name} \
description="A tool for cleaning opennebula cloud" \
maintainer="[email protected]" \
version=${version} \
branch=${branch}
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get --assume-yes upgrade && \
apt-get --assume-yes install ruby-dev zlib1g-dev gcc patch make
RUN gem install ${name} -v "${version}" --no-document
RUN useradd --system --shell /bin/false --home ${spoolDir} --create-home ${name} && \
usermod -L ${name} && \
mkdir -p ${templateDir} ${logDir} && \
chown -R ${name}:${name} ${spoolDir} ${logDir} ${templateDir}
VOLUME ${templateDir}
USER berta
ENTRYPOINT ["berta"]