Sign inSign up

dmesser/ds2mysqldriver

By dmesser

•Updated over 8 years ago

The containerized version of the DVDStore2 mysql load driver: https://github.com/dvdstore/ds21

Image
0

254

dmesser/ds2mysqldriver repository overview

Based on dotnet-20-runtime-centos7. Follow these steps to build the ds3webdriver on CentOS with .NET Core 2.0 from SCL:

sudo yum -y install centos-release-scl centos-release-dotnet git scl enable rh-dotnet20 bash git clone https://github.com/dvdstore/ds21⁠ mkdir ds2mysql && cd ds2mysql/ dotnet new console rm Program.cs cp ../ds21/ds2/drivers/ds2xdriver.cs . cp ../ds21/ds2/mysqlds2/ds2mysqlfns.cs .

modify the MySQL connection string in line 76 of ds2mysqlfns.cs to look like this (adjust username and password to your needs):

conn_str = "Server=" + target_server_name + ";User ID=ds2_user;Password=ds2_password;Database=DS2;SslMode=none";

dotnet add package MySql.Data --version 8.0.11 dotnet restore -r rhel.7-x64 dotnet build dotnet publish -f netcoreapp2.0 -c Release -r rhel.7-x64 --self-contained false

create the following Dockerfile while still being in the ds2webdriver/ directory:

FROM registry.centos.org/dotnet/dotnet-20-runtime-centos7

ADD bin/Release/netcoreapp2.0/rhel.7-x64/publish .

RUN ["touch", "driver_config.ini"]

ENTRYPOINT ["container-entrypoint", "dotnet", "ds2mysqldriver.dll"]

CMD ["--config_file=driver_config.ini"]

Build the image:

docker build -t ds2webdriver:latest .

Run by mapping in driver config file:

docker run -it -v /home/dmesser/ds2mysqldriver/driver.txt:/opt/app-root/app/driver_config.ini:Z ds2mysqldriver:latest

Optionally, run by supplying parameters directly:

docker run -it ds2mysqldriver:latest --db_size=20GB --run_time=5 --warmup_time=2 --think_time=0.01 --n_threads=8 --target=172.29.0.1

Tag summary

Content type

Image

Digest

Size

129.9 MB

Last updated

over 8 years ago

docker pull dmesser/ds2mysqldriver