File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM ubuntu
2
+
3
+ # ENV http_proxy=http://www-proxy.us.oracle.com:80
4
+ # ENV https_proxy=http://www-proxy.us.oracle.com:80
5
+
6
+ RUN apt update
7
+ RUN apt upgrade -y
8
+ RUN apt install -y gcc make libmysqlclient-dev cpanminus libdbi-perl
9
+ RUN cpanm install Devel::CheckLib
10
+ RUN cpanm install Test::Deep
11
+
12
+ ENV http_proxy=
13
+ ENV https_proxy=
14
+
15
+ # # Add the wait script to the image
16
+ ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.3/wait /wait
17
+ RUN chmod +x /wait
18
+
19
+ WORKDIR /driver
20
+ COPY . .
21
+
22
+ RUN perl ./Makefile.PL --testuser=root --testhost=mysqldb --testport=3306 --testdb=test
23
+
24
+ CMD /wait && make && make test
25
+
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ This is the Perl [DBI](https://metacpan.org/pod/DBI) driver for access to MySQL
6
6
7
7
Usage is described in [ DBD::mysql] ( https://metacpan.org/pod/DBD::mysql ) .
8
8
9
+ ## Building and Testing Using Docker
10
+
11
+ We've include some basic docker support for building and testing. This uses an Ubuntu image. It can be used as follows:
12
+
13
+ docker-compose build
14
+ docker-compose up --abort-on-container-exit --exit-code-from test
15
+
9
16
## Installation
10
17
11
18
Installation is described in [ DBD::mysql::INSTALL] ( https://metacpan.org/pod/DBD::mysql::INSTALL ) .
Original file line number Diff line number Diff line change
1
+ version : ' 3.3'
2
+
3
+ services :
4
+ mysqldb :
5
+ image : mysql:8.0
6
+ environment :
7
+ MYSQL_ALLOW_EMPTY_PASSWORD : ' true'
8
+ MYSQL_ROOT_HOST : ' %'
9
+ MYSQL_DATABASE : test
10
+
11
+ test :
12
+ depends_on :
13
+ - mysqldb
14
+ build :
15
+ context : .
16
+ environment :
17
+ WAIT_HOSTS : mysqldb:3306
You can’t perform that action at this time.
0 commit comments