Skip to content
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

Update postgres images, make sure all db services have versions in them #250

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

derschatta
Copy link
Member

@derschatta derschatta commented Aug 31, 2023

Addresses #159

This requires a few steps when you are using the affected services (mysql, mssql, pgsql, mariadb):

  1. Stop the container, e.g. tstop mysql
  2. Remove the old container, e.g. docker container rm totara_mysql57
  3. Pull the changes
  4. Then start the container with tdocker up -d --remove-orphans mysql57

If you follow these steps the data should still be there. Of course you need to update your config.php to connect to mysql57 instead of mysql.

@derschatta derschatta self-assigned this Aug 31, 2023
@derschatta derschatta added enhancement New feature or request Databases labels Aug 31, 2023
Copy link

@NathanielWalmsley NathanielWalmsley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with PGSQL 13 - all data was preserved, able to take down and re-up with no issues

Edit: retried with PGSQL changing "pgsql" to "pgsql12", same result

@derschatta
Copy link
Member Author

Thanks @NathanielWalmsley but the container we renamed is pgsql -> pgsql12. Probably best to try that one too.

@derschatta derschatta force-pushed the update-container-versions branch from ab50352 to 2aa8389 Compare September 3, 2023 22:31
@derschatta
Copy link
Member Author

rebased path as well

Copy link

@NingZhou-NZ NingZhou-NZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. Just a few suggestions

@@ -0,0 +1,130 @@
FROM php:8.0-fpm-buster

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FROM php:8.0-fpm-alpine

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already changed those to bullseye in #248

Going to alpine requires a bit more work and testing and I think I will open a new PR for that.

Comment on lines +5 to +30
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-transport-https \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libxml2-dev \
libicu-dev \
libpq-dev \
gnupg2 \
nano \
vim \
wget \
openssl \
locales \
tzdata \
git \
libzip-dev \
libmemcached-dev \
zip \
netcat \
bc \
ghostscript \
graphviz \
aspell \
libldap2-dev \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this need to be RUN apk add --no-cache

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related to alpine, that's going to be a separate piece of work for the php images

Comment on lines +79 to +84
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update && ACCEPT_EULA=Y apt-get install -y \
msodbcsql17 \
mssql-tools \
unixodbc-dev

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ && curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list \ && apt-get update && ACCEPT_EULA=Y apt-get install -y \ msodbcsql18 \ mssql-tools18 \ unixodbc-dev

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already covered in #244

Comment on lines +86 to +89
# Workaround to get MSSQL connection working on Debian 10 (buster)
# https://emacstragic.net/2017/11/06/mssql-odbc-client-on-debian-9-stretch/
RUN wget "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb" \
&& DEBIAN_FRONTEND=noninteractive dpkg -i ./libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep that's already done in the develop branch. see #244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Databases enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants