From e590c9423233b11f24edbab9d47e73fcb5f73a59 Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Tue, 14 Sep 2021 13:00:40 +0200 Subject: [PATCH] collapse all package installs --- .devcontainer/Dockerfile | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index cbc6bafa8..98963bad6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,11 +1,16 @@ FROM ubuntu:21.10 +# environment is to make python pass an interactive shell, probably not the best timezone given a wide variety of colleagues +ENV TZ=Europe/Amsterdam +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + RUN apt update && apt install -y \ autoconf \ bzip2 \ curl \ flex \ gcc \ + gdb \ git \ htop \ libcurl4-gnutls-dev \ @@ -20,11 +25,18 @@ RUN apt update && apt install -y \ libssl-dev \ libxslt-dev \ libzstd-dev \ + locales \ make \ + pspg \ + python3 \ + python3-pip \ sudo \ + uncrustify \ uuid-dev \ zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* + && apt clean + + RUN locale-gen en_US.UTF-8 # TODO remove caches with `apt clean` instead # allow all sudoers to login without a password prompt @@ -51,24 +63,6 @@ RUN pgenv build 13.4 # sets default pg version RUN pgenv switch 13.4 -# probably fold into install block earlier -#environment is to make python pass an interactive shell, probably not the best timezone given a wide variety of colleagues -ENV TZ=Europe/Amsterdam -RUN sudo ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ | sudo tee /etc/timezone - -RUN sudo apt update && sudo apt install -y \ - python3 \ - python3-pip \ - locales \ - && sudo apt clean - -RUN sudo locale-gen en_US.UTF-8 - -RUN sudo apt update && sudo apt install -y \ - pspg \ - uncrustify \ - && sudo apt clean - # bin directory for user tools RUN mkdir .bin ENV PATH="/home/citus/.bin:${PATH}" @@ -79,8 +73,6 @@ RUN pip3 install -r citus-tools/citus_dev/requirements.txt RUN ln -s /home/citus/citus-tools/citus_dev/citus_dev .bin/ RUN sudo make -C citus-tools/uncrustify install bindir=/usr/local/bin pkgsysconfdir=/usr/local/etc/ -# TODO add citus_indent - # TODO some LC_ALL errors, possibly solved by locale-gen RUN git clone https://github.com/so-fancy/diff-so-fancy.git RUN ln -s /home/citus/diff-so-fancy/diff-so-fancy .bin/ @@ -91,8 +83,3 @@ RUN sudo mkdir /data RUN sudo chown citus:citus /data COPY --chown=citus:citus .psqlrc . - -RUN sudo apt update && sudo apt install -y \ - gdb \ - && sudo apt clean - \ No newline at end of file