Dockerfile 1022 B

123456789101112131415161718192021222324252627282930313233
  1. FROM rust:bullseye
  2. # Dependencies
  3. RUN apt-get update -y \
  4. && apt-get install -y \
  5. llvm-11 psmisc postgresql-contrib postgresql-client \
  6. ruby ruby-dev libpq-dev python3 python3-pip lcov curl sudo iproute2 \
  7. strace ngrep iproute2 dnsutils lsof net-tools telnet
  8. # Rust
  9. RUN cargo install cargo-binutils rustfilt
  10. RUN rustup component add llvm-tools-preview
  11. # Ruby
  12. RUN sudo gem install bundler
  13. # Toxyproxy
  14. 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 && \
  15. sudo dpkg -i toxiproxy-2.4.0.deb
  16. # Config
  17. ENV APP_ROOT=/app
  18. ARG APP_USER=pgcat
  19. COPY dev_bashrc /etc/bash.bashrc
  20. RUN useradd -m -o -u 999 ${APP_USER} || exit 0 && mkdir ${APP_ROOT} && chown ${APP_USER} ${APP_ROOT}
  21. RUN adduser ${APP_USER} sudo \
  22. && echo "${APP_USER} ALL=NOPASSWD: ALL" > /etc/sudoers.d/${APP_USER} \
  23. && chmod ugo+s /usr/sbin/usermod /usr/sbin/groupmod
  24. ENV HOME=${APP_ROOT}
  25. WORKDIR ${APP_ROOT}
  26. ENTRYPOINT ["/bin/bash"]