From 07a981e8361979d5745bb6fe681aa2f549387600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 20 Jan 2019 16:39:51 +0000 Subject: [PATCH] add dockerfiles for base images --- .gitlab-ci.yml | 4 +-- fedora/Dockerfile | 53 +++++++++++++++++++++++++++++++++++++++ ubuntu/Dockerfile | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 fedora/Dockerfile create mode 100644 ubuntu/Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1bfcca8f..f5a2b300 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ image:fedora: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com script: - docker pull $CONTAINER_IMAGE:latest || true - - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest . + - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest ./fedora/ - docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA - docker push $CONTAINER_IMAGE:latest variables: @@ -26,7 +26,7 @@ image:ubuntu: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com script: - docker pull $CONTAINER_IMAGE:latest || true - - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest . + - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest ./ubuntu/ - docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA - docker push $CONTAINER_IMAGE:latest variables: diff --git a/fedora/Dockerfile b/fedora/Dockerfile new file mode 100644 index 00000000..9e3220d0 --- /dev/null +++ b/fedora/Dockerfile @@ -0,0 +1,53 @@ +FROM fedora:29 + +ENV LC_ALL en_GB.UTF-8 +ENV LANG en_GB.UTF-8 + +RUN dnf -y upgrade --best --allowerasing +RUN dnf -y --best --allowerasing install tmux atop zsh firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel conky conky-manager cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal qt5-linguist qtkeychain-qt5-devel archivemount keepass splix gutenprint-cups cups-bjnp golang redhat-rpm-config pcsc-lite-devel pcsc-tools pcsc-lite yubico-piv-tool yubikey-personalization-gui xloadimage yp-tools closure-compiler optipng jpegoptim grub2 grub2-efi dracut dracut-tools openssl-devel fail2ban syncthing ansible gnome-tweaks xclip + +RUN dnf -y install docker + +RUN dnf -y groupinstall "C Development Tools and Libraries" +RUN dnf -y groupinstall "Development Tools" + +RUN dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +RUN dnf -y groupupdate core + +RUN dnf -y install ffmpeg-libs + +RUN mkdir -p /root/dev/ +# vim +RUN git clone https://github.com/vim/vim.git --recursive /root/dev/vim +RUN cd /root/dev/vim && ./configure --with-features=huge \ + --enable-multibyte \ + --enable-rubyinterp \ + --enable-python3interp=yes \ + --enable-luainterp \ + --enable-gui=no \ + --enable-cscope +RUN cd /root/dev/vim && make -j`nproc` +RUN cd /root/dev/vim && make install + +RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN curl -sSL https://get.rvm.io | bash +RUN bash -c "source /etc/profile.d/rvm.sh && rvm install ruby --disable-binary" + +RUN curl -sSf https://sh.rustup.rs > /tmp/blastoff.sh +RUN chmod a+x /tmp/blastoff.sh +RUN /tmp/blastoff.sh -y +RUN rm -f /tmp/blastoff.sh + +RUN /root/.cargo/bin/rustup update +RUN /root/.cargo/bin/rustup install stable +RUN /root/.cargo/bin/rustup install nightly +RUN /root/.cargo/bin/rustup default stable + +RUN /root/.cargo/bin/rustup component add rls --toolchain stable +RUN /root/.cargo/bin/rustup component add clippy --toolchain stable +RUN /root/.cargo/bin/rustup component add rustfmt --toolchain stable +RUN /root/.cargo/bin/rustup component add rust-analysis --toolchain stable +RUN /root/.cargo/bin/rustup component add rust-src --toolchain stable + +RUN /root/.cargo/bin/cargo install cargo-update rustsym ripgrep fd-find genpass +RUN /root/.cargo/bin/cargo install-update -a diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile new file mode 100644 index 00000000..a9c3420d --- /dev/null +++ b/ubuntu/Dockerfile @@ -0,0 +1,64 @@ +FROM ubuntu:cosmic + +ENV LC_ALL en_GB.UTF-8 +ENV LANG en_GB.UTF-8 +ENV LANGUAGE en_GB.UTF-8 +ENV DEBIAN_FRONTEND=noninteractive + +RUN echo "APT::Acquire::Retries=16;" >> /etc/apt/apt.conf.d/99_retries +RUN apt-get update +RUN apt-get install -y --fix-missing sudo apt-utils aptitude dirmngr locales +RUN apt-get -y upgrade + +RUN sudo locale-gen en_GB.UTF-8 +RUN dpkg-reconfigure locales + +RUN apt-get -y install whois zsh tmux atop aria2 curl pv python-dev ruby-dev dkms linux-kernel-headers golang +RUN apt-get -y --fix-missing install lm-sensors mercurial git +RUN apt-get -y --fix-missing install build-essential cmake intltool +RUN apt-get -y --fix-missing install xorg +RUN apt-get -y --fix-missing install meld +RUN apt-get -y --fix-missing install gajim +RUN apt-get -y --fix-missing install lm-sensors +RUN apt-get -y --fix-missing install terminator +RUN apt-get -y --fix-missing install python3-pip python-pip +RUN apt-get -y --fix-missing install freecad +RUN apt-get -y --fix-missing install keepass2 +RUN apt-get -y --fix-missing install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev +RUN apt-get -y --fix-missing install gsmartcontrol redshift gtk-redshift gparted solaar glances silversearcher-ag retext kdiff3 + +RUN mkdir -p /root/dev/ +# vim +RUN git clone https://github.com/vim/vim.git --recursive /root/dev/vim +RUN cd /root/dev/vim && ./configure --with-features=huge \ + --enable-multibyte \ + --enable-rubyinterp \ + --enable-python3interp=yes \ + --enable-luainterp \ + --enable-gui=no \ + --enable-cscope +RUN cd /root/dev/vim && make -j`nproc` +RUN cd /root/dev/vim && make install + +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN curl -sSL https://get.rvm.io | bash +RUN bash -c "source /etc/profile.d/rvm.sh && rvm install ruby --disable-binary" + +RUN curl -sSf https://sh.rustup.rs > /tmp/blastoff.sh +RUN chmod a+x /tmp/blastoff.sh +RUN /tmp/blastoff.sh -y +RUN rm -f /tmp/blastoff.sh + +RUN /root/.cargo/bin/rustup update +RUN /root/.cargo/bin/rustup install stable +RUN /root/.cargo/bin/rustup install nightly +RUN /root/.cargo/bin/rustup default stable + +RUN /root/.cargo/bin/rustup component add rls --toolchain stable +RUN /root/.cargo/bin/rustup component add clippy --toolchain stable +RUN /root/.cargo/bin/rustup component add rustfmt --toolchain stable +RUN /root/.cargo/bin/rustup component add rust-analysis --toolchain stable +RUN /root/.cargo/bin/rustup component add rust-src --toolchain stable + +RUN /root/.cargo/bin/cargo install cargo-update rustsym ripgrep fd-find genpass +RUN /root/.cargo/bin/cargo install-update -a \ No newline at end of file