
+--no-install-recommends +Allowing curl pipe to fail early with previous SHELL command * Using WORKDIR instead of cd
36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
FROM mysql:8.0
|
|
|
|
# Prelim updates
|
|
RUN apt-get update
|
|
|
|
# Reasoning for each:
|
|
# git: Pulling from git remotes
|
|
# nginx: reverse proxy + offloading https responsibility to it
|
|
# that last point avoids slow loris attacks as nginx is hardened against them
|
|
# curl: download rustup setup script
|
|
# libmysqlclient-dev: required for building json-api to connect to mysql servers
|
|
# build-essential: compiling rust
|
|
# libssl-dev: for compiling json-api
|
|
RUN apt-get install git nginx \
|
|
curl libmysqlclient-dev build-essential \
|
|
libssl-dev \
|
|
-y --no-install-recommends
|
|
|
|
|
|
# Default rust toolchain
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | \
|
|
sh -s -- --default-toolchain=stable
|
|
|
|
ENV path="/root/.cargo/bin:${PATH}"
|
|
|
|
|
|
# Now we being the freechat installation process
|
|
RUN git clone https://gitlab.com/shockrah/freechat.git/ /opt/freechat/
|
|
WORKDIR /opt/freechat/
|
|
RUN sh docker-auto-build.sh --no-cargo-cache
|
|
|
|
# Sample env file to copy into the base image
|
|
# All keys present but not set to anything(null)
|
|
COPY sample.env /opt/freechat/.env
|