Skip to content

Commit

Permalink
reworked docker file (#4344)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and antkmsft committed Apr 5, 2023
1 parent 8c00070 commit febd77e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
32 changes: 26 additions & 6 deletions sdk/core/azure-core/test/libcurl-stress-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:22.04 as build
# 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 chmod +x ./azure-core-libcurl-stress-test
# 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

# install the mem check tool
RUN apt-get update -y
RUN apt-get install valgrind -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

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.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ matrix:
images:
cpp:
image: Dockerfile
imageBuildDir: "./"
imageBuildDir: "../../../../../"
scenarios:
constantDetach:
testTarget: azure-core-libcurl-stress-test
Expand Down

0 comments on commit febd77e

Please sign in to comment.