Skip to content

Commit

Permalink
base_image: replace base image of apache, nginx and pgsql to apline l…
Browse files Browse the repository at this point in the history
…inux
  • Loading branch information
Ning Zhou committed May 22, 2023
1 parent e30a442 commit 1acd422
Show file tree
Hide file tree
Showing 6 changed files with 21 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: 10 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,13 +39,14 @@ services:
- totara

pgsql10:
image: postgres:10.6
image: postgres:10-alpine
container_name: totara_pgsql10
ports:
- "5410: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'
volumes:
Expand All @@ -57,13 +58,14 @@ services:
- totara

pgsql11:
image: postgres:11.6
image: postgres:11-alpine
container_name: totara_pgsql11
ports:
- "5411: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'
volumes:
Expand All @@ -75,13 +77,14 @@ services:
- totara

pgsql:
image: postgres:12.1
image: postgres:12-alpine
container_name: totara_pgsql12
ports:
- "5432: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'
volumes:
Expand All @@ -93,7 +96,7 @@ services:
- totara

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

pgsql14:
image: postgres:14.0
image: postgres:14-alpine
container_name: totara_pgsql14
ports:
- "5443:5432"
Expand Down
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 1acd422

Please sign in to comment.