using rust:slim-buster as base image

This commit is contained in:
shockrah 2021-02-10 18:01:08 -08:00
parent 425ae60613
commit 836c50a6c2

View File

@ -1,10 +1,9 @@
FROM debian:sid-slim
FROM rust:slim-buster
# Pre-reqs for sql and building later on
# required for building rust things and grabbing node
RUN apt-get update && apt-get upgrade -y && apt-get install \
git curl python3 pkg-config \
libmysqlclient-dev build-essential \
libssl-dev ca-certificates gnupg\
git default-libmysqlclient-dev pkg-config \
curl libssl-dev ca-certificates gnupg \
-y --no-install-recommends
@ -18,15 +17,14 @@ RUN echo "deb-src https://deb.nodesource.com/node_14.x sid main" >> /etc/apt/sou
RUN apt-get update && apt-get install nodejs \
-y --no-install-recommends
# Setup rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --default-toolchain stable
ENV PATH="/root/.cargo/bin:${PATH}"
# Biuld all the projects required to run
RUN git clone https://gitlab.com/shockrah/freechat /opt/freechat/
WORKDIR /opt/freechat/
RUN bash docker-auto-build.sh --no-cargo-cache
# Clean up from the apt-gets and things we don't do this
RUN apt-get remove curl gnupg ca-certificates -y # will go unused in regular builds
RUN apt-get autoremove -y
RUN rm -rf /var/lib/apt/lists/*