-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (39 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
51 lines (39 loc) · 1.48 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM ubuntu:18.04
ARG branch=master
ARG version
ENV name="cloudkeeper"
ENV spoolDir="/var/spool/${name}"
ENV imgDir="${spoolDir}/images" \
runDir="/var/run/${name}" \
logDir="/var/log/${name}" \
lockDir="/var/lock/${name}" \
nginxLogDir="/var/log/nginx" \
nginxLibDir="/var/lib/nginx"
LABEL application=${name} \
description="A tool for synchronizing appliances between AppDB and CMFs" \
maintainer="kimle@cesnet.cz" \
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 qemu-utils curl nginx file gnupg
# EGI trust anchors
RUN set -o pipefail && \
curl -s https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 | apt-key add - && \
echo $'#### EGI Trust Anchor Distribution ####\n\
deb http://repository.egi.eu/sw/production/cas/1/current egi-igtf core' > /etc/apt/sources.list.d/egi.list && \
apt-get update && \
apt-get --assume-yes install ca-policy-egi-core
# cloudkeeper
RUN gem install ${name} -v "${version}" --no-document
# env
RUN useradd --system --shell /bin/false --home ${spoolDir} --create-home ${name} && \
usermod -L ${name} && \
mkdir -p ${imgDir} ${runDir} ${logDir} ${lockDir} && \
chown -R ${name}:${name} ${spoolDir} ${runDir} ${logDir} ${lockDir} ${nginxLogDir} ${nginxLibDir}
VOLUME ${imgDir}
EXPOSE 50505
USER ${name}
ENTRYPOINT ["cloudkeeper"]