feat: add docker and gitlab-ci file

This commit is contained in:
Tarabanov.Ilya
2024-06-24 00:47:56 +03:00
parent fcbd3f91d1
commit da4aed78aa
2 changed files with 24 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
variables:
REGISTRY: "registry.gitlab.resds.ru"
stages:
- build
.docker-login:
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$REGISTRY"
build:
extends: .docker-login
stage: build
script:
- docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
+8
View File
@@ -0,0 +1,8 @@
FROM ubuntu:focal-20240530
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Moscow"
WORKDIR /app
RUN apt update && apt install git cmake fmtools python3-venv postgresql libpq-dev libev-dev libyaml-cpp-dev lld openssl libboost-all-dev gcc g++ postgresql pkg-config build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libboost-filesystem-dev -y
RUN apt install libssl-dev openssl libcrypto++-dev libhttp-parser-dev libnghttp2-dev -y
COPY ./ /app/
RUN git submodule init && git submodule update
RUN cmake --build /app/ -j 4 -DCMAKE_BUILD_TYPE=Release