Skip to content

Commit

Permalink
replace base image to alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
Ning Zhou committed May 19, 2023
1 parent e30a442 commit ec28d73
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 16 deletions.
4 changes: 2 additions & 2 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM httpd:2.4
FROM httpd:2.4-alpine

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
RUN apk update && apk add \
nano \
openssl \
gettext
Expand Down
2 changes: 1 addition & 1 deletion apache/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# if there's no ssl certificate yet create it
if [ ! -f "/usr/local/apache2/conf/server.crt" ]; then
Expand Down
17 changes: 17 additions & 0 deletions compose/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ services:
networks:
- totara

mariadb109:
image: mariadb:10.9
container_name: totara_mariadb109
ports:
- "3313:3306"
environment:
TZ: ${TIME_ZONE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PW}
volumes:
- mariadb109-data:/var/lib/mysql
- ./mariadb:/etc/mysql/conf.d
depends_on:
- nginx
networks:
- totara

mariadb108:
image: mariadb:10.8
container_name: totara_mariadb108
Expand Down Expand Up @@ -115,6 +131,7 @@ services:

volumes:
mariadb-data:
mariadb109-data:
mariadb108-data:
mariadb107-data:
mariadb106-data:
Expand Down
34 changes: 27 additions & 7 deletions compose/pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"
services:

pgsql93:
image: postgres:9.3
image: postgres:9.3-alpine
container_name: totara_pgsql93
ports:
- "5493:5432"
Expand All @@ -20,7 +20,7 @@ services:
- totara

pgsql96:
image: postgres:9.6
image: postgres:9.6-alpine
container_name: totara_pgsql96
ports:
- "5496:5432"
Expand All @@ -39,7 +39,7 @@ services:
- totara

pgsql10:
image: postgres:10.6
image: postgres:10-alpine
container_name: totara_pgsql10
ports:
- "5410:5432"
Expand All @@ -57,7 +57,7 @@ services:
- totara

pgsql11:
image: postgres:11.6
image: postgres:11-alpine
container_name: totara_pgsql11
ports:
- "5411:5432"
Expand All @@ -75,7 +75,7 @@ services:
- totara

pgsql:
image: postgres:12.1
image: postgres:12-alpine
container_name: totara_pgsql12
ports:
- "5432:5432"
Expand All @@ -93,7 +93,7 @@ services:
- totara

pgsql13:
image: postgres:13.0
image: postgres:13-alpine
container_name: totara_pgsql13
ports:
- "5442:5432"
Expand All @@ -112,7 +112,7 @@ services:
- totara

pgsql14:
image: postgres:14.0
image: postgres:14-alpine
container_name: totara_pgsql14
ports:
- "5443:5432"
Expand All @@ -130,6 +130,25 @@ services:
networks:
- totara

pgsql15:
image: postgres:15-alpine
container_name: totara_pgsql15
ports:
- "5444:5432"
environment:
TZ: ${TIME_ZONE}
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_HOST_AUTH_METHOD: trust
command:
postgres -c 'config_file=/etc/postgresql/postgresql.conf' -c 'enable_memoize=off'
volumes:
- ./pgsql/my-postgres.conf:/etc/postgresql/postgresql.conf
- pgsql15-data:/var/lib/postgresql/data
depends_on:
- nginx
networks:
- totara

volumes:
pgsql93-data:
pgsql96-data:
Expand All @@ -138,3 +157,4 @@ volumes:
pgsql12-data:
pgsql13-data:
pgsql14-data:
pgsql15-data:
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
# docker-compose -f docker-compose.yml -f compose/nginx.yml -f compose/pgsql.yml -f compose/php.yml up -d pgsql php-7.3

nodejs:
image: node:16
image: node:16-alpine3.16
container_name: totara_nodejs
environment:
TZ: ${TIME_ZONE}
Expand All @@ -28,7 +28,8 @@ services:
- totara

redis:
image: redis
image: redis:alpine
container_name: totara_redis
# activate persistency
command: "redis-server --appendonly yes"
environment:
Expand All @@ -39,7 +40,8 @@ services:
- totara

memcached:
image: memcached
image: memcached:alpine
container_name: totara_memcached
environment:
TZ: ${TIME_ZONE}
networks:
Expand Down
4 changes: 2 additions & 2 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM nginx:1.20
FROM nginx:alpine

ENV REMOTE_DATA=${REMOTE_DATA}

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
RUN apk update && apk add \
nano \
openssl \
gettext
Expand Down
2 changes: 1 addition & 1 deletion nginx/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# if there's no ssl certificate yet create it
if [ ! -f "/etc/nginx/ssl/domain.crt" ]
Expand Down

0 comments on commit ec28d73

Please sign in to comment.