Skip to content

Commit c392cf3

Browse files
committed
modify dockerfile
1 parent e65beb3 commit c392cf3

File tree

4 files changed

+8
-37
lines changed

4 files changed

+8
-37
lines changed

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ services:
1414
- taos-network
1515

1616
taos:
17-
image: tdengine/tdengine:3.3.3.0
17+
image: tdengine/tsdb
1818
restart: always
1919
hostname: taos
20-
volumes:
21-
- "./taos.cfg:/etc/taos/taos.cfg"
20+
2221
ports:
2322
- 6030:6030
2423
- 6035:6035

src/Example/Dockerfile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
2-
3-
FROM mcr.microsoft.com/dotnet/runtime:8.0-bookworm-slim AS base
4-
MAINTAINER Yanhong Ma 2024
5-
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free" > /etc/apt/sources.list && \
6-
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free" >> /etc/apt/sources.list && \
7-
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free" >> /etc/apt/sources.list && \
8-
apt-get -y -q update && apt-get install -y --no-install-recommends -q apt-utils lsof net-tools wget curl iputils-ping inetutils-tools && \
2+
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS base
3+
RUN apt-get -y -q update && apt-get install -y --no-install-recommends -q apt-utils lsof net-tools wget curl iputils-ping inetutils-tools && \
94
apt-get autoremove -y && apt-get clean && apt-get autoclean && rm /var/cache/apt/* -rf && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
10-
RUN curl -o TDengine-client.tar.gz "https://www.taosdata.com/assets-download/3.0/TDengine-client-3.3.3.0-Linux-x64.tar.gz" && \
11-
tar -xvf TDengine-client.tar.gz && rm TDengine-client.tar.gz -f && cd $(ls TDengine-client* -d) && \
5+
RUN curl -o tdengine-tsdb-oss-client.tar.gz "https://downloads.taosdata.com/tdengine-tsdb-oss/3.3.8.8/tdengine-tsdb-oss-client-3.3.8.8-linux-x64.tar.gz" && \
6+
tar -xvf tdengine-tsdb-oss-client.tar.gz && rm tdengine-tsdb-oss-client.tar.gz -f && cd $(ls tdengine-tsdb-oss-client* -d) && \
127
./install_client.sh && \
138
rm $(pwd) -rf
149
WORKDIR /app
1510

16-
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
11+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
1712
WORKDIR /src
1813

1914
COPY ["src/Example/Example.csproj", "src/Example/"]
2015
COPY ["src/IoTSharp.Data.Taos/IoTSharp.Data.Taos.csproj", "src/IoTSharp.Data.Taos/"]
21-
COPY ["src/EFCore.Taos.Core/IoTSharp.EntityFrameworkCore.Taos.csproj", "src/EFCore.Taos.Core/"]
2216
COPY ["src/LICENSE", "LICENSE"]
2317
RUN dotnet restore "src/Example/Example.csproj"
2418
COPY . .

src/Example/Example.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<ItemGroup>
1313
<PackageReference Include="ConsoleTableExt" Version="3.3.0" />
1414
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
15-
<PackageReference Include="System.Text.Encoding.CodePages" Version="10.0.1" />
1615
</ItemGroup>
1716

1817
<ItemGroup>

src/Example/Program.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,7 @@ private static void Main(string[] args)
109109
connection.Close();
110110
}
111111
}
112-
113-
114-
//using (var connection = new TaosConnection(builder.ConnectionString))
115-
//{
116-
// try
117-
// {
118-
// connection.Open();
119-
120-
// connection.CreateCommand($"select * from power.meters where current > 10")
121-
// .ExecuteSubscribe<(DateTime ts, double current, double voltage, double phase, string location)>
122-
// ("topic-meter-current-bg-10", data => Console.WriteLine($"ts:{data.ts} current:{data.current} voltage:{data.voltage} phase:{data.phase} location:{data.location} "));
123-
124-
// }
125-
// catch (Exception ex)
126-
// {
127-
// Console.WriteLine("执行ExecuteSubscribe异常" + ex.Message);
128-
// }
129-
// finally
130-
// {
131-
// connection.Close();
132-
// }
133-
//}
112+
Console.WriteLine("测试完成。");
134113
}
135114
/// <summary>
136115
/// #259 #258

0 commit comments

Comments
 (0)