This commit brings a complete overhaul of the build system:
- Creates a separation of concerns for 'local' and 'remote' building
* 'local' is built locally via the docker-finance `build` command
* 'remote' is built *outside* of the docker-finance `build` command
(pushed to a remote registry and then pulled by the 'local' build)
* Related refactoring
- Dockerfiles
- `lib_gen`
- Adds remote image 'hledger-suite'
* Provides the latest versions of all `hledger` related binaries
* No longer relies on package maintainers / out-dated packages
- Adds remote image 'docker-finance'
* Provides base image for 'finance' and 'dev-tools' images
- tags 'archlinux' | 'ubuntu' | 'dev-tools'
- Removes previous `hledger` related build modules
* Removes building any `hledger` related binaries locally
- Removes 'experimental' build
* End-user can use local custom Dockerfile and/or custom tag instead
- Updates the 'default' | 'slim' | 'tiny' | 'micro' build types
* Refactors build type requirements into separate build modules
- Adds 'fetch' module
- Adds 'track' module
- Adds 'user' module
* creates container user *after* base and all other modules
* allows for quick re-building across multiple local users
- Updates 'root' module
* `lib_docker`
- Updates usage help
- Adds build modules per build type
- Huge optimizations
* Vastly improves build times
- ~60% faster w/ a fresh build
- ~60%-90% faster rebuild (depending on image type)
* Vastly improves image sizes
- e.g., 'default' Arch Linux image size is ~50% smaller
70 lines
2.0 KiB
Docker
70 lines
2.0 KiB
Docker
# docker-finance | modern accounting for the power-user
|
|
#
|
|
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
# 'root' module
|
|
#
|
|
|
|
USER root
|
|
|
|
# ROOT.cern dependencies (regardless of building or not)
|
|
RUN apt-get install -y \
|
|
binutils \
|
|
cmake \
|
|
dpkg-dev \
|
|
g++ \
|
|
gcc \
|
|
libssl-dev \
|
|
libtbb-dev \
|
|
libx11-dev \
|
|
libxext-dev \
|
|
libxft-dev \
|
|
libxpm-dev \
|
|
python3
|
|
|
|
# ROOT.cern pre-compiled installation
|
|
RUN apt-get install -y curl
|
|
WORKDIR /usr/local/src
|
|
RUN curl --location -O "https://root.cern/download/root_v6.32.02.Linux-ubuntu24.04-x86_64-gcc13.2.tar.gz"
|
|
RUN tar xvzf "root_v6.32.02.Linux-ubuntu24.04-x86_64-gcc13.2.tar.gz"
|
|
|
|
# ROOT.cern environment
|
|
#
|
|
# bash_aliases notes:
|
|
#
|
|
# - *MUST* source thisroot.sh (from any directory)
|
|
#
|
|
# - For `docker-finance version` command:
|
|
#
|
|
# - To avoid thisroot.sh error, pushd/popd is required (per thisroot.sh)
|
|
#
|
|
# - Although $ROOTSYS will be available during normal operation, it won't
|
|
# be avaialble to `docker-finance version`- so add binary to PATH here.
|
|
RUN echo "pushd /usr/local/src/root/bin 1>/dev/null && source \"/usr/local/src/root/bin/thisroot.sh\" && popd 1>/dev/null" >>/etc/bash.bashrc
|
|
RUN echo "export PATH=\"\$PATH::/usr/local/src/root/bin\"" >>/etc/bash.bashrc
|
|
|
|
# docker-finance
|
|
USER root
|
|
RUN apt-get install -y \
|
|
googletest \
|
|
libbenchmark-dev \
|
|
libbotan-2-dev \
|
|
libcrypto++-dev \
|
|
libsodium-dev
|
|
|
|
# vim: sw=2 sts=2 si ai et
|