diff options
author | Devaev Maxim <[email protected]> | 2018-07-08 06:28:12 +0000 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-07-08 06:28:12 +0000 |
commit | 41ce7ff2862816a7d97792851e00a6daf400905e (patch) | |
tree | 32ba8222b98f8a37310d20c581685db8e102c8fb /kvmd/testenv/Dockerfile | |
parent | b1d72e86637b233d26e7b68724251d98030d6052 (diff) |
test environment for docker
Diffstat (limited to 'kvmd/testenv/Dockerfile')
-rw-r--r-- | kvmd/testenv/Dockerfile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/kvmd/testenv/Dockerfile b/kvmd/testenv/Dockerfile new file mode 100644 index 00000000..12744df3 --- /dev/null +++ b/kvmd/testenv/Dockerfile @@ -0,0 +1,43 @@ +FROM base/archlinux + +RUN pacman -Syu --noconfirm \ + && pacman -S --noconfirm \ + git \ + patch \ + make \ + fakeroot \ + binutils \ + expac \ + jshon \ + sudo \ + && pacman -Sc --noconfirm + +RUN useradd -r -d / packer \ + && cd /tmp \ + && sudo -u packer git clone https://aur.archlinux.org/packer-color.git \ + && cd packer-color \ + && sudo -u packer makepkg \ + && pacman --noconfirm -U packer-color-*.pkg.tar.xz \ + && ln -s /usr/bin/packer-color /usr/local/bin/packer \ + && cp /usr/bin/packer-color /usr/local/bin/user-packer \ + && sed -i -e "s|makepkg \$MAKEPKGOPTS |chown -R packer:packer \$dir; makepkg \$MAKEPKGOPTS |g" \ + /usr/local/bin/user-packer \ + && sed -i -e "s|makepkg \$MAKEPKGOPTS --asroot -f|sudo -u packer makepkg \$MAKEPKGOPTS -f|g" \ + /usr/local/bin/user-packer \ + && cd - \ + && rm -rf /tmp/packer-color + +RUN pacman -Syy \ + && user-packer -S --noconfirm \ + python \ + python-pip \ + nginx \ + mjpg-streamer-pikvm \ + && pacman -Sc --noconfirm + +COPY testenv/requirements.txt requirements.txt +RUN pip install -r requirements.txt + +RUN dd if=/dev/zero of=/root/loop.img bs=1024 count=1048576 + +CMD /bin/bash |