-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace base image to alpine #240
base: develop
Are you sure you want to change the base?
Changes from all commits
fc3739e
20acc85
f404729
8dd4a6d
0ffdd04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,11 @@ | |
|
||
script_path="$( cd "$(dirname "$0")" ; pwd -P )" | ||
project_path="$( cd $script_path && cd ..; pwd -P )" | ||
export $(grep -E -v '^#' $project_path/.env | xargs) | ||
|
||
$script_path/tdocker build "$@" | ||
# Check the OS and make image for that OS | ||
if [ $(uname -m) == "arm64" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doesn't it automatically use the one you are currently running? |
||
$script_path/tdocker build --build-arg ARCH="arm64v8" "$@" | ||
else | ||
$script_path/tdocker build "$@" | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ version: "3.7" | |
services: | ||
|
||
pgsql93: | ||
image: postgres:9.3 | ||
image: postgres:9.3-alpine | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all the pgsql images have been changed to alpine in #250 |
||
container_name: totara_pgsql93 | ||
ports: | ||
- "5493:5432" | ||
|
@@ -20,7 +20,7 @@ services: | |
- totara | ||
|
||
pgsql96: | ||
image: postgres:9.6 | ||
image: postgres:9.6-alpine | ||
container_name: totara_pgsql96 | ||
ports: | ||
- "5496:5432" | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happens without this environment variable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I try to remove the db password from local image. |
||
command: | ||
postgres -c 'config_file=/etc/postgresql/postgresql.conf' | ||
volumes: | ||
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -93,7 +96,7 @@ services: | |
- totara | ||
|
||
pgsql13: | ||
image: postgres:13.0 | ||
image: postgres:13-alpine | ||
container_name: totara_pgsql13 | ||
ports: | ||
- "5442:5432" | ||
|
@@ -112,7 +115,7 @@ services: | |
- totara | ||
|
||
pgsql14: | ||
image: postgres:14.0 | ||
image: postgres:14-alpine | ||
container_name: totara_pgsql14 | ||
ports: | ||
- "5443:5432" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe should be |
||
container_name: totara_nodejs | ||
environment: | ||
TZ: ${TIME_ZONE} | ||
|
@@ -28,7 +28,8 @@ services: | |
- totara | ||
|
||
redis: | ||
image: redis | ||
image: redis:alpine | ||
container_name: totara_redis | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this could create problems if someone has been running it before, conflicts with existing containers. Not strictly necessay anyway, so maybe it's safer to not add container names in this patch. |
||
# activate persistency | ||
command: "redis-server --appendonly yes" | ||
environment: | ||
|
@@ -39,7 +40,8 @@ services: | |
- totara | ||
|
||
memcached: | ||
image: memcached | ||
image: memcached:alpine | ||
container_name: totara_memcached | ||
environment: | ||
TZ: ${TIME_ZONE} | ||
networks: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
FROM nginx:1.20 | ||
ARG ARCH=amd64 | ||
FROM $ARCH/nginx:alpine | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove ARCH (we don't want to optimise for only one architecture, rather build an image which supports both, arm and amd). And change image to |
||
|
||
ENV REMOTE_DATA=${REMOTE_DATA} | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
RUN apk update && apk add \ | ||
nano \ | ||
openssl \ | ||
gettext | ||
|
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" ] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes in the PHP Dockerfiles are obsolete, they have been updated to bullseye in #248. Moving the PHP containers to alpine is possible I think but requires a bit more work. I have experimented with it locally and can add a followup patch at a later stage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the ARCH, we don't want to build only for one architecture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also docker will automatically pick the right arch depending on the host I believe.