Skip to content

Commit

Permalink
yanet docker image: set version on build via ARGs, build binaries for…
Browse files Browse the repository at this point in the history
… corei7,broadwell,knl archs
  • Loading branch information
Timur Aitov committed Sep 21, 2023
1 parent aea92bb commit 21601bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 19 additions & 3 deletions docker/yanet.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
FROM yanetplatform/builder AS builder

ARG YANET_VERSION_MAJOR
ARG YANET_VERSION_MINOR
ARG YANET_VERSION_REVISION
ARG YANET_VERSION_HASH
ARG YANET_VERSION_CUSTOM

COPY . /project
RUN meson setup --prefix=/target -Dyanet_config=release,firewall,l3balancer build
RUN meson compile -C build
RUN meson install -C build
RUN meson setup --prefix=/target \
-Dtarget=release \
-Dyanet_config=release,firewall,l3balancer \
-Darch=corei7,broadwell,knl \
-Dversion_major=$YANET_VERSION_MAJOR \
-Dversion_minor=$YANET_VERSION_MINOR \
-Dversion_revision=$YANET_VERSION_REVISION \
-Dversion_hash=$YANET_VERSION_HASH \
-Dversion_custom=$YANET_VERSION_CUSTOM \
build_release

RUN meson compile -C build_release
RUN meson install -C build_release


FROM ubuntu:22.04
Expand Down
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ if get_option('target').contains('release')
install_data('yanet-cli.zsh_completion',
rename: '_yanet-cli',
install_dir: get_option('datadir') / 'zsh' / 'functions' / 'Completion' / 'Unix')

install_data('yanet-wrapper', install_dir: get_option('bindir'))
elif get_option('target').contains('autotest')
subdir('autotest')
endif

0 comments on commit 21601bf

Please sign in to comment.