Skip to content

Commit 1c88c2d

Browse files
committed
Add some dockerfiles
1 parent a928d0f commit 1c88c2d

11 files changed

Lines changed: 679 additions & 20 deletions

File tree

Containers/ReadMe.md

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ docker buildx build -f do-mssql-2017 -t do-mssql:2017 .
1919
```console
2020
docker buildx build -f do-mssql-2019 -t do-mssql:2019 .
2121
```
22+
```console
23+
docker buildx build -f do-mssql-2022 -t do-mssql:2022 .
24+
```
2225

2326
Don't forget about the dot at the end.
2427

@@ -34,6 +37,9 @@ docker run --name DO_SQL2017 -h DO_SQL2017 -e ACCEPT_EULA=Y -e MSSQL_PID="Develo
3437
```console
3538
docker run --name DO_SQL2019 -h DO_SQL2019 -e ACCEPT_EULA=Y -e MSSQL_PID="Developer" -e MSSQL_SA_PASSWORD="<your sa password>" -e TZ=<timezone of host> -e MSSQL_INIT_WAIT=60 -p 1419:1433 -d do-mssql:2019
3639
```
40+
```console
41+
docker run --name DO_SQL2022 -h DO_SQL2022 -e ACCEPT_EULA=Y -e MSSQL_PID="Developer" -e MSSQL_SA_PASSWORD="<your sa password>" -e TZ=<timezone of host> -e MSSQL_INIT_WAIT=60 -p 1422:1433 -d do-mssql:2022
42+
```
3743

3844
Here,
3945

@@ -66,6 +72,9 @@ Data Source=WILLY\DO_SQL2017,1417;Initial Catalog=DO-Tests;User Id=dotest;Passwo
6672
```
6773
Data Source=WILLY\DO_SQL2019,1419;Initial Catalog=DO-Tests;User Id=dotest;Password=dotest;MultipleActiveResultSets=True;
6874
```
75+
```
76+
Data Source=WILLY\DO_SQL2022,1422;Initial Catalog=DO-Tests;User Id=dotest;Password=dotest;MultipleActiveResultSets=True;
77+
```
6978

7079

7180

@@ -95,6 +104,18 @@ docker buildx build -f do-postgre-10 -t do-postgres:10.0 .
95104
```console
96105
docker buildx build -f do-postgre-11 -t do-postgres:11.0 .
97106
```
107+
```console
108+
docker buildx build -f do-postgre-12 -t do-postgres:12.0 .
109+
```
110+
```console
111+
docker buildx build -f do-postgre-13 -t do-postgres:13.0 .
112+
```
113+
```console
114+
docker buildx build -f do-postgre-14 -t do-postgres:14.0 .
115+
```
116+
```console
117+
docker buildx build -f do-postgre-15 -t do-postgres:15.0 .
118+
```
98119

99120

100121
NOTE Images older than 9.6 are unable to update tzdata so some tests can fail due to specific way of working with offset on ```TIMESTAMP WITH TIMEZONE```.
@@ -122,18 +143,31 @@ docker run --name postgre-10 -e POSTGRES_PASSWORD=<your password> -e POSTGRES_HO
122143
```console
123144
docker run --name postgre-11 -e POSTGRES_PASSWORD=<your password> -e POSTGRES_HOST_AUTH_METHOD=md5 -e TZ=<timezone of host> -p 54110:5432 -d do-postgres:11.0
124145
```
146+
```console
147+
docker run --name postgre-12 -e POSTGRES_PASSWORD=<your password> -e POSTGRES_HOST_AUTH_METHOD=md5 -e TZ=<timezone of host> -p 54120:5432 -d do-postgres:12.0
148+
```
149+
```console
150+
docker run --name postgre-13 -e POSTGRES_PASSWORD=<your password> -e POSTGRES_HOST_AUTH_METHOD=md5 -e TZ=<timezone of host> -p 54130:5432 -d do-postgres:13.0
151+
```
152+
```console
153+
docker run --name postgre-14 -e POSTGRES_PASSWORD=<your password> -e POSTGRES_HOST_AUTH_METHOD=md5 -e TZ=<timezone of host> -p 54140:5432 -d do-postgres:14.0
154+
```
155+
```console
156+
docker run --name postgre-15 -e POSTGRES_PASSWORD=<your password> -e POSTGRES_HOST_AUTH_METHOD=md5 -e TZ=<timezone of host> -p 54150:5432 -d do-postgres:15.0
157+
```
158+
125159

126160
Here,
127161

128-
``` --name postgre-17``` - name of the container
162+
``` --name postgre-15``` - name of the container
129163

130164
```-e POSTGRES_PASSWORD=<your password>``` - superuser password, required by base image.
131165

132-
```-e POSTGRES_HOST_AUTH_METHOD=md5``` - option that controlls 'auth-method'. For test purposes 'md5' is ok.
166+
```-e POSTGRES_HOST_AUTH_METHOD=md5``` - option that controlls 'auth-method'. For test purposes 'md5' ok.
133167

134168
```-e TZ=<timezone of host>``` - Some of tests still assume that test runner and storage insance are in the same timezone. If you run and test locally on your machine, set it to host timezone, otherwise false falling tests appear.
135169

136-
```-p 54110:5432``` - host-to-container port mappings. If serveral containers are run on the same host they require to have different ports. We use following pattern - first two digits of standard port (5432) and PostgreSQL version after that e.g. 110 for 11.0, 96 for 9.6.
170+
```-p 54150:5432``` - host-to-container port mappings. If serveral containers are run on the same host they require to have different ports. We use following pattern - first two digits of standard port (5432) and PostgreSQL version after that e.g. 150 for 15.0, 96 for 9.6.
137171

138172

139173
During first run of container database structure and users will be created. By default it creates 'dotest' user, 'dotest' database with several schemas within.
@@ -154,10 +188,13 @@ HOST=WILLY;PORT=5490;DATABASE=dotest;USER ID=dotest;PASSWORD=dotest;
154188
HOST=WILLY;PORT=5496;DATABASE=dotest;USER ID=dotest;PASSWORD=dotest;
155189
```
156190
```
157-
HOST=WILLY;PORT=54110;DATABASE=dotest;USER ID=dotest;PASSWORD=dotest;
191+
HOST=WILLY;PORT=54120;DATABASE=dotest;USER ID=dotest;PASSWORD=dotest;
192+
```
193+
```
194+
"HOST=WILLY;PORT=54150;DATABASE=dotest;USER ID=dotest;PASSWORD=dotest;
158195
```
159196

160-
for containers postgre-9.0, postgre-9.6, postgre-11 respectively, you get the idea.
197+
for containers postgre-9.0, postgre-9.6, postgre-12, postgre-15 respectively, you get the idea.
161198

162199

163200
# MySQL
@@ -175,6 +212,12 @@ docker buildx build -f do-mysq-5_5 -t do-mysql:5.5 .
175212
```console
176213
docker buildx build -f do-mysq-5_6 -t do-mysql:5.6 .
177214
```
215+
```console
216+
docker buildx build -f do-mysq-5_7 -t do-mysql:5.7 .
217+
```
218+
```console
219+
docker buildx build -f do-mysq-8_0 -t do-mysql:8.0 .
220+
```
178221

179222

180223
### Run container
@@ -186,12 +229,18 @@ docker run --name mysql-5.5 -p 3355:3306 -e MYSQL_ROOT_PASSWORD=<your password>
186229
```console
187230
docker run --name mysql-5.6 -p 3356:3306 -e MYSQL_ROOT_PASSWORD=<your password> -e MYSQL_DATABASE=dotest -e MYSQL_USER=dotest -e MYSQL_PASSWORD=dotest -d do-mysql:5.6
188231
```
232+
```console
233+
docker run --name mysql-5.7 -p 3357:3306 -e MYSQL_ROOT_PASSWORD=<your password> -e MYSQL_DATABASE=dotest -e MYSQL_USER=dotest -e MYSQL_PASSWORD=dotest -d do-mysql:5.7
234+
```
235+
```console
236+
docker run --name mysql-8.0 -p 3380:3306 -e MYSQL_ROOT_PASSWORD=<your password> -e MYSQL_DATABASE=dotest -e MYSQL_USER=dotest -e MYSQL_PASSWORD=dotest -d do-mysql:8.0
237+
```
189238

190239
Here,
191240

192-
``` --name mysql-5.6``` - name of container, can be changed, affects nothing
241+
``` --name mysql-8.0``` - name of container, can be changed, affects nothing
193242

194-
``` -p 3356:3306``` - host-to-container port mapping. We use following pattern - two first digits from default port (3306) folowed by version of MySQL e.g. 56 for MySQL 5.6.
243+
``` -p 3380:3306``` - host-to-container port mapping. We use following pattern - two first digits from default port (3306) folowed by version of MySQL e.g. 55 for MySQL 5.5, 80 for MySQL.
195244

196245
``` -e MYSQL_ROOT_PASSWORD=<your password>``` - root password, required by base image.
197246

@@ -215,7 +264,12 @@ Server=WILLY;Port=3355;Database=dotest;Uid=dotest;Pwd=dotest;Default Command Tim
215264
```
216265
Server=WILLY;Port=3356;Database=dotest;Uid=dotest;Pwd=dotest;Default Command Timeout=120;
217266
```
218-
267+
```
268+
Server=WILLY;Port=3357;Database=dotest;Uid=dotest;Pwd=dotest;Default Command Timeout=120;
269+
```
270+
```
271+
Server=WILLY;Port=3380;Database=dotest;Uid=dotest;Pwd=dotest;Default Command Timeout=120;
272+
```
219273

220274

221275
# Firebird
@@ -255,7 +309,7 @@ Here,
255309

256310
``` -e FIREBIRD_DATABASE_PAGE_SIZE=8192``` - page size for database.
257311

258-
```-p 3053:3050``` - host-to-container port mapping. We use following pattern - first three digits of standard port (3050) and major version of Firebird, e.g. 3, 4 ,5.
312+
```-p 3053:3050``` - host-to-container port mapping. We use following pattern - first three digits of standard port (3050) and major version of Firebird.
259313

260314
Pair ```FIREBIRD_USER``` / ```FIREBIRD_PASSWORD``` can be omitted, in this case initialization script will handle it and create 'dotest' user with 'dotest' password.
261315

Containers/mssql/do-mssql-2017

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@ FROM mcr.microsoft.com/mssql/server:2017-CU31-ubuntu-18.04
22

33
# See https://github.com/microsoft/mssql-docker/blob/master/linux/preview/examples/mssql-agent-fts-ha-tools/Dockerfile
44
# for details
5-
RUN export DEBIAN_FRONTEND=noninteractive && \
6-
apt-get update && \
7-
#Actualize time zone database
8-
apt-get install -y tzdata && \
9-
apt-get install -yq curl apt-transport-https && \
10-
apt-get install -y gnupg2 && \
11-
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
12-
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | tee /etc/apt/sources.list.d/mssql-server.list && \
13-
apt-get update && \apt-get install -y mssql-server-fts && \
14-
apt-get clean && \
15-
rm -rf /var/lib/apt/lists
5+
RUN export DEBIAN_FRONTEND=noninteractive
6+
RUN apt-get update
7+
8+
#Actualize time zone database
9+
RUN apt-get install -y tzdata
10+
RUN apt-get install -yq curl apt-transport-https
11+
RUN apt-get install -y gnupg2
12+
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
13+
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | tee /etc/apt/sources.list.d/mssql-server.list
14+
RUN apt-get update
15+
RUN apt-get install -y mssql-server-fts
16+
RUN apt-get clean
17+
RUN rm -rf /var/lib/apt/lists
1618

1719
# Create a config directory
1820
RUN mkdir -p /usr/config

Containers/mssql/do-mssql-2022

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM mcr.microsoft.com/mssql/server:2022-CU18-ubuntu-22.04
2+
USER root
3+
4+
# See https://github.com/microsoft/mssql-docker/blob/master/linux/preview/examples/mssql-agent-fts-ha-tools/Dockerfile
5+
# for details
6+
RUN export DEBIAN_FRONTEND=noninteractive && \
7+
apt-get update && \
8+
#Actualize time zone database
9+
apt-get install -y tzdata && \
10+
apt-get install -yq curl apt-transport-https && \
11+
apt-get install -y gnupg2 && \
12+
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
13+
curl https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server.list && \
14+
apt-get update && \apt-get install -y mssql-server-fts && \
15+
apt-get clean && \
16+
rm -rf /var/lib/apt/lists
17+
18+
# Create a config directory
19+
RUN mkdir -p /usr/config
20+
WORKDIR /usr/config
21+
22+
# Bundle config source
23+
COPY configure-db.sh /usr/config/
24+
COPY entrypoint.sh /usr/config/
25+
COPY setup.sql /usr/config/
26+
27+
# Grant permissions for to our scripts to be executable
28+
RUN chmod +x /usr/config/entrypoint.sh
29+
RUN chmod +x /usr/config/configure-db.sh
30+
31+
ENTRYPOINT ["./entrypoint.sh"]

0 commit comments

Comments
 (0)