mirror of https://github.com/citusdata/citus.git
move dev tools to later layer
parent
7dacbbd2e8
commit
d926bea1c4
|
@ -4,17 +4,13 @@ FROM ubuntu:22.04 AS base
|
||||||
ENV TZ=Europe/Amsterdam
|
ENV TZ=Europe/Amsterdam
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
RUN yes | unminimize
|
# install build tools
|
||||||
|
|
||||||
RUN apt update && apt install -y \
|
RUN apt update && apt install -y \
|
||||||
autoconf \
|
|
||||||
bzip2 \
|
bzip2 \
|
||||||
curl \
|
curl \
|
||||||
flex \
|
flex \
|
||||||
gcc \
|
gcc \
|
||||||
gdb \
|
|
||||||
git \
|
git \
|
||||||
htop \
|
|
||||||
libcurl4-gnutls-dev \
|
libcurl4-gnutls-dev \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
libkrb5-dev \
|
libkrb5-dev \
|
||||||
|
@ -29,24 +25,20 @@ RUN apt update && apt install -y \
|
||||||
libzstd-dev \
|
libzstd-dev \
|
||||||
locales \
|
locales \
|
||||||
make \
|
make \
|
||||||
man\
|
|
||||||
pkg-config \
|
pkg-config \
|
||||||
pspg \
|
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
sudo \
|
sudo \
|
||||||
uuid-dev \
|
uuid-dev \
|
||||||
vim \
|
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
&& apt clean
|
&& apt clean
|
||||||
|
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
|
|
||||||
# allow all sudoers to login without a password prompt
|
# add the citus user to sudoers and allow all sudoers to login without a password prompt
|
||||||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
RUN useradd -ms /bin/bash citus \
|
||||||
|
&& usermod -aG sudo citus \
|
||||||
RUN useradd -ms /bin/bash citus
|
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
RUN usermod -aG sudo citus
|
|
||||||
|
|
||||||
WORKDIR /home/citus
|
WORKDIR /home/citus
|
||||||
USER citus
|
USER citus
|
||||||
|
@ -111,12 +103,24 @@ RUN cmake ..
|
||||||
RUN make -sj8
|
RUN make -sj8
|
||||||
|
|
||||||
RUN make install DESTDIR=/uncrustify
|
RUN make install DESTDIR=/uncrustify
|
||||||
RUN echo "cachebuster"
|
|
||||||
RUN tree /uncrustify/usr
|
|
||||||
|
|
||||||
# assemble the final container by copying over the artifacts from separately build containers
|
# assemble the final container by copying over the artifacts from separately build containers
|
||||||
FROM base AS devcontainer
|
FROM base AS devcontainer
|
||||||
|
|
||||||
|
RUN yes | sudo unminimize
|
||||||
|
|
||||||
|
# install developer productivity tools
|
||||||
|
RUN sudo apt update \
|
||||||
|
&& sudo apt install -y \
|
||||||
|
autoconf \
|
||||||
|
bash-completion \
|
||||||
|
gdb \
|
||||||
|
htop \
|
||||||
|
man \
|
||||||
|
pspg \
|
||||||
|
vim \
|
||||||
|
&& sudo apt clean
|
||||||
|
|
||||||
COPY --from=pg12 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
COPY --from=pg12 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
||||||
COPY --from=pg13 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
COPY --from=pg13 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
||||||
COPY --from=pg14 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
COPY --from=pg14 /home/citus/.pgenv-staging/ /home/citus/.pgenv/
|
||||||
|
|
Loading…
Reference in New Issue