Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/docker-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ on:
push:
branches: [ "master" ]
paths:
- 'docker/build-image/**'
- 'docker/**'
- '.github/workflows/docker-build-image.yml'
pull_request:
branches: [ "master" ]
paths:
- 'docker/build-image/**'
- 'docker/**'
- '.github/workflows/docker-build-image.yml'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set Images Version
run: echo "KNP_IMAGE_VERSION=v1.0.${{ github.run_number }}" >> $GITHUB_ENV
- name: Set up Docker
uses: docker/setup-docker-action@v5
with:
Expand All @@ -37,13 +39,25 @@ jobs:
with:
username: ${{ vars.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push the base Docker image for Kaspersky Neuromorphic Platform
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: "{{defaultContext}}:docker/base-image"
load: true
push: true
tags: ${{ vars.DOCKERHUB_LOGIN }}/knp-base-image:${{ env.KNP_IMAGE_VERSION }}
build-args: KNP_IMAGE_VERSION=${{ env.KNP_IMAGE_VERSION }}
timeout-minutes: 180
continue-on-error: false
- name: Build and push the Docker image for Kaspersky Neuromorphic Platform build
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: "{{defaultContext}}:docker/build-image"
load: true
push: true
tags: ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image:latest
build-args: KNP_IMAGE_VERSION=${{ env.KNP_IMAGE_VERSION }}
tags: ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image:${{ env.KNP_IMAGE_VERSION }}
timeout-minutes: 180
continue-on-error: false
79 changes: 79 additions & 0 deletions docker/base-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Base image Dockerfile.
#
# © 2024-2026 AO Kaspersky Lab
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ARG KNP_IMAGE_VERSION=2.0.0
ARG TARGETPLATFORM
FROM gcc:14.2.0

ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /azp

RUN \
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes \
&& export DEBIAN_VERSION=debian$(cat /etc/debian_version | sed 's/\..*//') \
&& apt-get update \
&& apt-get -y --no-install-recommends --show-progress install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
gdbserver \
git \
gnupg-agent \
jq \
libcurl4 \
libunwind8 \
netcat-openbsd \
net-tools \
libopencv-dev \
p7zip-full \
python3 \
python3-opencv \
python3-pip \
python3-requests \
python3-types-requests \
software-properties-common \
ssh \
strace \
tar \
valgrind \
wget \
zip \
$(apt list|awk '/boost.*1.81.*-dev/ {print($1);}') \
&& apt-get clean \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
gpg --dearmor | tee /etc/apt/keyrings/docker.gpg > /dev/null \
&& add-apt-repository \
"deb [arch=$(echo ${TARGETPLATFORM}|cut -f2 -d/)] https://download.docker.com/linux/ubuntu \
mantic \
stable" \
&& export VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) \
&& export DESTINATION=/usr/local/bin/docker-compose \
&& curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-`uname -s`-`uname -m` -o "${DESTINATION}" \
&& chmod +x ${DESTINATION} \
&& ln -sf ${DESTINATION} /usr/bin/docker-compose

RUN rm -rf /tmp/*

COPY LICENSE.txt .
COPY NOTICE.txt .

COPY start.sh /start.sh
RUN chmod +x /start.sh

ENTRYPOINT ["/start.sh"]
Loading
Loading