Use mirrors snapshots
[fuel.git] / build / docker / Dockerfile
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
4 # stefan.k.berg@ericsson.com
5 # jonas.bjurel@ericsson.com
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 FROM ubuntu:14.04
13 ENV http_proxy INSERT_HTTP_PROXY
14 ENV https_proxy INSERT_HTTPS_PROXY
15 ENV no_proxy INSERT_NO_PROXY
16
17 RUN apt-get update
18 RUN apt-get install -y software-properties-common python-software-properties \
19     make python-setuptools python-all dpkg-dev debhelper \
20     fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \
21     ca-certificates sudo apt-utils lsb-release dosfstools debmirror
22
23 RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
24 RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies
25 # Keeping PWD is needed to build as root
26 RUN echo "Defaults env_keep += \"PWD\"" > /etc/sudoers.d/keep-pwd
27 # Keeping variables for ISO build
28 RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL\"" > /etc/sudoers.d/keep-mos
29 RUN chmod 0440 /etc/sudoers.d/open-sudo
30 RUN chmod 0440 /etc/sudoers.d/keep-proxies
31 RUN chmod 0440 /etc/sudoers.d/keep-pwd
32 RUN chmod 0440 /etc/sudoers.d/keep-mos
33 RUN chmod 4755 /bin/fusermount
34
35 ADD ./setcontext /root/setcontext
36 RUN chmod +x /root/setcontext
37 ADD ./enable_dockerx2 /root/enable_dockerx2
38 RUN chmod +x /root/enable_dockerx2
39
40 VOLUME /var/lib/docker