reworked docker file (#4344)

* reworked docker file

* removed unnecessary su

* update docker file

* qwq

* Update sdk/core/azure-core/test/libcurl-stress-test/Dockerfile

Co-authored-by: Ben Broderick Phillips <ben@benbp.net>

* url

---------

Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
This commit is contained in:
George Arama 2023-02-17 11:40:54 -08:00 committed by GitHub
parent 971d20be3e
commit 30afd1eb89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 8 deletions

View File

@ -322,7 +322,7 @@ The following SDK library releases are available on [vcpkg](https://github.com/m
* `azure-storage-files-shares-cpp`
* `azure-storage-queues-cpp`
> NOTE: In case of getting linker errors when consuming the SDK on Windows, make sure that [vcpkg triplet](https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md) being consumed matches the [CRT link flags](https://docs.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library?view=msvc-160) being set for your app or library build. See also `MSVC_USE_STATIC_CRT` build flag.
> NOTE: In case of getting linker errors when consuming the SDK on Windows, make sure that [vcpkg triplet](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/users/triplets.md) being consumed matches the [CRT link flags](https://docs.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library?view=msvc-160) being set for your app or library build. See also `MSVC_USE_STATIC_CRT` build flag.
## OpenSSL Version

View File

@ -1,13 +1,33 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:22.04 as build
# FROM mcr.microsoft.com/mirror/docker/library/ubuntu:22.04
# install the mem check tool along side the other deps
RUN apt-get update -y
RUN apt-get install -y gcc cmake make g++ git zip unzip build-essential pkg-config wget curl valgrind
RUN wget -O vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/master.tar.gz
RUN mkdir /opt/vcpkg
RUN tar xf vcpkg.tar.gz --strip-components=1 -C /opt/vcpkg
RUN /opt/vcpkg/bootstrap-vcpkg.sh
RUN ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg
ADD . /src
WORKDIR /build
RUN cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DBUILD_TRANSPORT_CURL=ON /src
RUN cmake --build . --target azure-core-libcurl-stress-test
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:22.04
# copy the tagrget binary
COPY ./bin/libcurl-stress-test/azure-core-libcurl-stress-test ./azure-core-libcurl-stress-test
RUN apt-get update -y
RUN apt-get install -y valgrind
WORKDIR /
# copy the target binary
COPY --from=build ./build/sdk/core/azure-core/test/libcurl-stress-test/azure-core-libcurl-stress-test ./azure-core-libcurl-stress-test
RUN chmod +x ./azure-core-libcurl-stress-test
# install the mem check tool
RUN apt-get update -y
RUN apt-get install valgrind -y
CMD ./azure-core-libcurl-stress-test
# this should be run by the scenarios matrix , run valgrind only when needed since it impacts performance and resources.

View File

@ -8,7 +8,7 @@ matrix:
images:
cpp:
image: Dockerfile
imageBuildDir: "./"
imageBuildDir: "../../../../../"
scenarios:
constantDetach:
testTarget: azure-core-libcurl-stress-test