mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-22 17:06:29 +00:00
Use rust:bullseye base image With the original rust:1.70-bullseye image, the container cannot be built: 17.06 Installing /usr/local/cargo/bin/rustfilt 17.06 Installed package `rustfilt v0.2.1` (executable `rustfilt`) 17.06 error: failed to compile `cargo-binutils v0.3.6`, intermediate artifacts can be found at `/tmp/cargo-installrc6mPb` 17.06 17.06 Caused by: 17.06 package `cargo-platform v0.1.8` cannot be built because it requires rustc 1.73 or newer, while the currently active rustc version is 1.70.0 17.06 Try re-running cargo install with `--locked` 17.06 Summary Successfully installed rustfilt! Failed to install cargo-binutils (see error(s) above). 17.06 error: some crates failed to install This is the same base image used on tests/docker/Dockerfile
36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
FROM rust:bullseye
|
|
|
|
# Dependencies
|
|
COPY --from=sclevine/yj /bin/yj /bin/yj
|
|
RUN /bin/yj -h
|
|
RUN apt-get update -y \
|
|
&& apt-get install -y \
|
|
llvm-11 psmisc postgresql-contrib postgresql-client \
|
|
ruby ruby-dev libpq-dev python3 python3-pip lcov curl sudo iproute2 \
|
|
strace ngrep iproute2 dnsutils lsof net-tools telnet
|
|
|
|
# Rust
|
|
RUN cargo install cargo-binutils rustfilt
|
|
RUN rustup component add llvm-tools-preview
|
|
|
|
# Ruby
|
|
RUN sudo gem install bundler
|
|
|
|
# Toxyproxy
|
|
RUN wget -O toxiproxy-2.4.0.deb https://github.com/Shopify/toxiproxy/releases/download/v2.4.0/toxiproxy_2.4.0_linux_$(dpkg --print-architecture).deb && \
|
|
sudo dpkg -i toxiproxy-2.4.0.deb
|
|
|
|
# Config
|
|
ENV APP_ROOT=/app
|
|
ARG APP_USER=pgcat
|
|
COPY dev_bashrc /etc/bash.bashrc
|
|
|
|
RUN useradd -m -o -u 999 ${APP_USER} || exit 0 && mkdir ${APP_ROOT} && chown ${APP_USER} ${APP_ROOT}
|
|
RUN adduser ${APP_USER} sudo \
|
|
&& echo "${APP_USER} ALL=NOPASSWD: ALL" > /etc/sudoers.d/${APP_USER} \
|
|
&& chmod ugo+s /usr/sbin/usermod /usr/sbin/groupmod
|
|
ENV HOME=${APP_ROOT}
|
|
WORKDIR ${APP_ROOT}
|
|
|
|
ENTRYPOINT ["/bin/bash"]
|