Initial commit

This commit is contained in:
Templates
2024-02-07 18:32:15 +03:00
commit c0ee0f7f11
4 changed files with 126 additions and 0 deletions

57
Dockerfile Normal file
View File

@@ -0,0 +1,57 @@
ARG DOCKER_REGISTRY=harbor.avroid.tech/docker-hub-proxy/library
# https://hub.docker.com/_/ubuntu
FROM ${DOCKER_REGISTRY}/ubuntu:22.04
LABEL description="Base build image based on ubuntu 22.04"
# Disable output interactive dialogs in console for service commands
ENV DEBIAN_FRONTEND=noninteractive
# Nexus
ARG NEXUS_DOMAIN_NAME="nexus.avroid.tech"
ARG NEXUS_URL="https://${NEXUS_DOMAIN_NAME}"
# swap basic os repos to nexus mirrors https://nexus.avroid.tech
RUN sed -ie "s/deb\ http\:\/\/archive.ubuntu.com\/ubuntu/deb\ [trusted=yes] https\:\/\/${NEXUS_DOMAIN_NAME}\/repository\/mirror-os-apt-ubuntu/g" /etc/apt/sources.list && \
sed -ie "s/deb\ http\:\/\/security.ubuntu.com\/ubuntu/deb\ [trusted=yes] https\:\/\/${NEXUS_DOMAIN_NAME}\/repository\/mirror-os-apt-ubuntu/g" /etc/apt/sources.list && \
echo "Acquire::https::${NEXUS_DOMAIN_NAME}::Verify-Peer \"false\";" > /etc/apt/apt.conf.d/99nexus_proxy_cert && \
apt update && \
apt install -y ca-certificates && \
apt update && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV TZ="Europe/Moscow"
# Set timezone on Ubuntu
RUN apt update && \
apt install -y --no-install-recommends tzdata && \
ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Upgrade OS in container
RUN apt update && \
apt install -y --no-install-recommends apt-utils && \
apt dist-upgrade -y && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install common packages for C/C++ projects build
RUN apt update &&\
apt install -y \
build-essential \
cmake \
curl \
cutils \
git \
make \
pkg-config \
python3 \
python3-pip \
wget && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
ln -sf /usr/bin/python3 /usr/bin/python