Skip to content

Commit cdbb56e

Browse files
authored
Merge pull request shimat#1431 from shimat/docker_ubuntu20_dotnet6_opencv460
Docker: dotnet5-opencv453 -> dotnet6-opencv460
2 parents 13f66e8 + efc0681 commit cdbb56e

File tree

5 files changed

+41
-41
lines changed

5 files changed

+41
-41
lines changed

.github/workflows/docker-deploy-ubuntu20.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99

1010
env:
1111
DEBIAN_FRONTEND: noninteractive
12-
DOCKER_IMAGE_NAME1: "ubuntu20-dotnet5-opencv4.5.3"
13-
DOCKER_IMAGE_NAME2: "ubuntu20-dotnet5sdk-opencv4.5.3"
12+
DOCKER_IMAGE_NAME1: "ubuntu20-dotnet6-opencv4.6.0"
13+
DOCKER_IMAGE_NAME2: "ubuntu20-dotnet6sdk-opencv4.6.0"
1414

1515
jobs:
1616
build:

.github/workflows/docker-amazonlinux.yml renamed to .github/workflows/docker-ubuntu20.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker public.ecr.aws/lambda/dotnet:5.0
1+
name: Docker mcr.microsoft.com/dotnet/sdk:6.0-focal
22

33
on:
44
pull_request:
@@ -19,5 +19,5 @@ jobs:
1919

2020
- name: docker build
2121
run: |
22-
cd docker/al2-dotnet5-opencv4.5.3
23-
docker build -t shimat/al2-dotnet5-opencv4.5.3 .
22+
cd docker/ubuntu20-dotnet6sdk-opencv4.6.0
23+
docker build -t shimat/ubuntu20-dotnet6sdk-opencv4.6.0 .

docker/al2-dotnet5-opencv4.5.3/Dockerfile renamed to docker/al2-dotnet5-opencv4.6.0/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM public.ecr.aws/lambda/dotnet:5.0
22

3-
ENV OPENCV_VERSION=4.5.5
3+
ENV OPENCV_VERSION=4.6.0
44

55
WORKDIR /
66

@@ -38,7 +38,7 @@ RUN cd opencv && mkdir build && cd build && \
3838
-D BUILD_opencv_python_bindings_generator=OFF \
3939
-D BUILD_opencv_python_tests=OFF \
4040
-D BUILD_opencv_ts=OFF \
41-
-D BUILD_opencv_js=OFF \
41+
-D BUILD_opencv_js=OFF \
4242
-D BUILD_opencv_bioinspired=OFF \
4343
-D BUILD_opencv_ccalib=OFF \
4444
-D BUILD_opencv_datasets=OFF \
@@ -64,7 +64,7 @@ RUN cd opencv && mkdir build && cd build && \
6464
RUN wget https://github.com/shimat/opencvsharp/archive/master.zip && \
6565
unzip master.zip && rm master.zip && \
6666
mv opencvsharp-master opencvsharp && \
67-
cd opencvsharp
67+
cd opencvsharp
6868

6969
# Install the Extern lib.
7070
RUN mkdir /opencvsharp/make && cd /opencvsharp/make && \

docker/ubuntu20-dotnet5sdk-opencv4.5.3/Dockerfile renamed to docker/ubuntu20-dotnet6-opencv4.6.0/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal as builder
1+
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal as builder
22

33
ENV DEBIAN_FRONTEND=noninteractive
4-
ENV OPENCV_VERSION=4.5.3
4+
ENV OPENCV_VERSION=4.6.0
55

66
WORKDIR /
77

@@ -82,7 +82,7 @@ RUN cd opencv && mkdir build && cd build && \
8282
-D BUILD_opencv_structured_light=OFF \
8383
-D BUILD_opencv_surface_matching=OFF \
8484
-D BUILD_opencv_videostab=OFF \
85-
-D BUILD_opencv_wechat_qrcode=OFF \
85+
-D BUILD_opencv_wechat_qrcode=ON \
8686
-D WITH_GSTREAMER=OFF \
8787
-D WITH_ADE=OFF \
8888
-D OPENCV_ENABLE_NONFREE=ON \
@@ -102,7 +102,7 @@ RUN mkdir /opencvsharp/make && cd /opencvsharp/make && \
102102

103103
########## Test native .so file ##########
104104

105-
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal
105+
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
106106
RUN apt-get update && apt-get -y install --no-install-recommends gcc
107107
# /usr/lib/libOpenCvSharpExtern.so
108108
# /usr/local/lib/libopencv_*.a
@@ -123,19 +123,19 @@ int main(){ \n\
123123

124124
########## Test .NET class libraries ##########
125125

126-
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal
126+
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
127127
COPY --from=builder /usr/lib /usr/lib
128128
# Install Build the C# part of OpenCvSharp
129129
RUN git clone https://github.com/shimat/opencvsharp.git && cd opencvsharp
130130
RUN cd /opencvsharp/src/OpenCvSharp && \
131-
dotnet build -c Release -f net5.0 && \
131+
dotnet build -c Release -f net6.0 && \
132132
cd /opencvsharp/src/OpenCvSharp.Extensions && \
133-
dotnet build -c Release -f net5.0
133+
dotnet build -c Release -f net6.0
134134

135-
RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net5.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null
135+
RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net6.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null
136136

137137
# Simple console app test using NuGet
138-
# RUN dotnet new console -f net5.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \
138+
# RUN dotnet new console -f net6.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \
139139
# echo "\n\
140140
#using System; \n\
141141
#using OpenCvSharp; \n\
@@ -156,5 +156,5 @@ RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c
156156

157157
########## Final image ##########
158158

159-
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal as final
159+
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal as final
160160
COPY --from=builder /usr/lib /usr/lib

docker/ubuntu20-dotnet5-opencv4.5.3/Dockerfile renamed to docker/ubuntu20-dotnet6sdk-opencv4.6.0/Dockerfile

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal as builder
1+
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal as builder
22

33
ENV DEBIAN_FRONTEND=noninteractive
4-
ENV OPENCV_VERSION=4.5.3
4+
ENV OPENCV_VERSION=4.6.0
55

66
WORKDIR /
77

@@ -58,7 +58,7 @@ RUN cd opencv && mkdir build && cd build && \
5858
-D BUILD_PERF_TESTS=OFF \
5959
-D BUILD_TESTS=OFF \
6060
-D BUILD_JAVA=OFF \
61-
-D BUILD_opencv_apps=OFF \
61+
-D BUILD_opencv_app=OFF \
6262
-D BUILD_opencv_barcode=OFF \
6363
-D BUILD_opencv_java_bindings_generator=OFF \
6464
-D BUILD_opencv_js_bindings_generator=OFF \
@@ -102,7 +102,7 @@ RUN mkdir /opencvsharp/make && cd /opencvsharp/make && \
102102

103103
########## Test native .so file ##########
104104

105-
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal
105+
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
106106
RUN apt-get update && apt-get -y install --no-install-recommends gcc
107107
# /usr/lib/libOpenCvSharpExtern.so
108108
# /usr/local/lib/libopencv_*.a
@@ -123,38 +123,38 @@ int main(){ \n\
123123

124124
########## Test .NET class libraries ##########
125125

126-
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal
126+
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
127127
COPY --from=builder /usr/lib /usr/lib
128128
# Install Build the C# part of OpenCvSharp
129129
RUN git clone https://github.com/shimat/opencvsharp.git && cd opencvsharp
130130
RUN cd /opencvsharp/src/OpenCvSharp && \
131-
dotnet build -c Release -f net5.0 && \
131+
dotnet build -c Release -f net6.0 && \
132132
cd /opencvsharp/src/OpenCvSharp.Extensions && \
133-
dotnet build -c Release -f net5.0
133+
dotnet build -c Release -f net6.0
134134

135-
RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net5.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null
135+
RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net6.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null
136136

137137
# Simple console app test using NuGet
138-
#RUN dotnet new console -f net5.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \
139-
# echo "\n\
140-
#using System; \n\
141-
#using OpenCvSharp; \n\
142-
#class Program{ \n\
143-
# static void Main(){ \n\
144-
# Console.WriteLine(Cv2.GetTickCount()); \n\
145-
# using var mat = new Mat(1, 1, MatType.CV_8UC1); \n\
146-
# Console.WriteLine(mat.CvPtr); \n\
147-
# } \n\
148-
#}" > Program.cs && \
149-
# dotnet add package OpenCvSharp4 && \
150-
# dotnet run && \
151-
# rm -rf /ConsoleApp01
138+
# RUN dotnet new console -f net6.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \
139+
# echo "\n\
140+
# using System; \n\
141+
# using OpenCvSharp; \n\
142+
# class Program{ \n\
143+
# static void Main(){ \n\
144+
# Console.WriteLine(Cv2.GetTickCount()); \n\
145+
# using var mat = new Mat(1, 1, MatType.CV_8UC1); \n\
146+
# Console.WriteLine(mat.CvPtr); \n\
147+
# } \n\
148+
# }" > Program.cs && \
149+
# dotnet add package OpenCvSharp4 && \
150+
# dotnet run && \
151+
# rm -rf /ConsoleApp01
152152

153153
#RUN ldd /artifacts/libOpenCvSharpExtern.so
154154

155155

156156

157157
########## Final image ##########
158158

159-
FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal as final
159+
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal as final
160160
COPY --from=builder /usr/lib /usr/lib

0 commit comments

Comments
 (0)