- Removing layers where needed to reduce build size(hopefully)
This commit is contained in:
parent
7d9e71c866
commit
0fbd390b4c
@ -10,23 +10,18 @@ RUN apt-get update && apt-get upgrade -y && apt-get install \
|
|||||||
git default-libmysqlclient-dev pkg-config \
|
git default-libmysqlclient-dev pkg-config \
|
||||||
curl libssl-dev ca-certificates gnupg \
|
curl libssl-dev ca-certificates gnupg \
|
||||||
python3 python3-pip \
|
python3 python3-pip \
|
||||||
-y --no-install-recommends
|
-y --no-install-recommends && \
|
||||||
|
pip3 install virtualenv
|
||||||
|
|
||||||
# Install virtualenv as its semi-required for python packages in freechat
|
# Install virtualenv as its semi-required for python packages in freechat
|
||||||
# This is a (very) small goal: removing all python dependancies outside of testing
|
# This is a (very) small goal: removing all python dependancies outside of testing
|
||||||
# Because frankly Rust binaries + Node BS + Python is just too awful to maintain
|
# Because frankly Rust binaries + Node BS + Python is just too awful to maintain
|
||||||
RUN pip3 install virtualenv
|
|
||||||
|
|
||||||
# Setup python3 as required for the mock client
|
|
||||||
|
|
||||||
# Setup node
|
# Setup node
|
||||||
# grab key
|
# grab key
|
||||||
RUN curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
RUN curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||||
# add binary & source ppa
|
echo "deb https://deb.nodesource.com/node_14.x sid main" > /etc/apt/sources.list.d/nodesource.list && \
|
||||||
RUN echo "deb https://deb.nodesource.com/node_14.x sid main" > /etc/apt/sources.list.d/nodesource.list
|
echo "deb-src https://deb.nodesource.com/node_14.x sid main" >> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
RUN echo "deb-src https://deb.nodesource.com/node_14.x sid main" >> /etc/apt/sources.list.d/nodesource.list
|
apt-get update && apt-get install nodejs \
|
||||||
RUN apt-get update && apt-get install nodejs \
|
|
||||||
-y --no-install-recommends
|
-y --no-install-recommends
|
||||||
|
|
||||||
|
|
||||||
@ -35,27 +30,24 @@ RUN apt-get update && apt-get install nodejs \
|
|||||||
# with this docker that we're mostly just using Mysql's default everything
|
# with this docker that we're mostly just using Mysql's default everything
|
||||||
# Later on in another script we setup a proper user to interface with sql but still,
|
# Later on in another script we setup a proper user to interface with sql but still,
|
||||||
# nothing here is to be used in prod(once again)
|
# nothing here is to be used in prod(once again)
|
||||||
RUN mkdir /opt/mysql-setup
|
RUN mkdir /opt/mysql-setup && \
|
||||||
RUN curl "https://repo.mysql.com//mysql-apt-config_0.8.17-1_all.deb" \
|
curl "https://repo.mysql.com//mysql-apt-config_0.8.17-1_all.deb" \
|
||||||
-o /opt/mysql-setup/mysql-apt-config_0.8.17-1_all.deb
|
-o /opt/mysql-setup/mysql-apt-config_0.8.17-1_all.deb && \
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
export DEBIAN_FRONTEND=noninteractive && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install /opt/mysql-setup/mysql-apt-config_0.8.17-1_all.deb \
|
apt-get install /opt/mysql-setup/mysql-apt-config_0.8.17-1_all.deb \
|
||||||
-y --no-install-recommends
|
-y --no-install-recommends && \
|
||||||
|
apt-get install mysql-community-server && \
|
||||||
# Use the newly installed mysql packages to install the server component
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install mysql-community-server \
|
|
||||||
-y --no-install-recommends
|
-y --no-install-recommends
|
||||||
|
|
||||||
|
|
||||||
# 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/*
|
|
||||||
|
|
||||||
# Start the mysql service
|
|
||||||
|
RUN apt-get remove curl gnupg ca-certificates -y && apt-get autoremove -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# The entrypoint script not only starts the mysql service for us but it also gives
|
||||||
|
# us a shell to run commands in
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user