-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (27 loc) · 895 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
35
36
37
FROM ubuntu:18.04
ARG branch=master
ARG version
ENV name="cloudkeeper-aws" \
username="cloudkeeper"
ENV spoolDir="/var/spool/${username}"
ENV logDir="/var/log/${username}"
LABEL application=${name} \
description="A tool for synchronizing appliances between cloudkeeper and AWS" \
maintainer="[email protected]" \
version=${version} \
branch=${branch}
SHELL ["/bin/bash", "-c"]
# update + dependencies
RUN apt-get update && \
apt-get --assume-yes upgrade && \
apt-get --assume-yes install ruby
# cloudkeeper-aws
RUN gem install ${name} -v "${version}" --no-document
# env
RUN useradd --system --shell /bin/false --home ${spoolDir} --create-home ${username} && \
usermod -L ${username} && \
mkdir -p ${logDir} && \
chown -R ${username}:${username} ${spoolDir} ${logDir}
EXPOSE 50051
USER ${username}
ENTRYPOINT ["cloudkeeper-aws"]