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

Upgrade alpine #1851

Merged
merged 9 commits into from Aug 4, 2021
Merged

Upgrade alpine #1851

merged 9 commits into from Aug 4, 2021

Conversation

nextgens
Copy link
Contributor

@nextgens nextgens commented Jul 5, 2021

What type of PR?

bug-fix

What does this PR do?

Upgrade all the images to alpine 3.14 and switch from libressl to openssl on the admin container to work around a bug in alpine

Related issue(s)

Prerequistes

Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

  • In case of feature or enhancement: documentation updated accordingly
  • Unless it's docs or a minor change: add changelog entry file.

@nextgens nextgens added type/security Related to security type/backport Automatic backport this PR to the current stable release labels Jul 5, 2021
@nextgens nextgens added this to the 1.8 milestone Jul 5, 2021
@mergify
Copy link
Contributor

mergify bot commented Jul 5, 2021

Thanks for submitting this pull request.
Bors-ng will now build test images. When it succeeds, we will continue to review and test your PR.

bors try

Note: if this build fails, read this.

bors bot added a commit that referenced this pull request Jul 5, 2021
@bors
Copy link
Contributor

bors bot commented Jul 5, 2021

try

Build failed:

@Diman0
Copy link
Member

Diman0 commented Jul 5, 2021

I agree that removing cyrus-sasl-plain is the easiest approach for now. If people really want the functionality back, we could look into building cyrus-sasl-plain manually.

bors try

@Diman0
Copy link
Member

Diman0 commented Jul 5, 2021

bors try

bors bot added a commit that referenced this pull request Jul 5, 2021
@bors
Copy link
Contributor

bors bot commented Jul 5, 2021

try

Build failed:

@Diman0
Copy link
Member

Diman0 commented Jul 5, 2021

New error for building admin image.

 (1/10) Installing curl (7.77.0-r1)
(2/10) Installing libressl3.3-libcrypto (3.3.3-r0)
(3/10) Installing libressl3.3-libssl (3.3.3-r0)
(4/10) Installing libressl3.3-libtls (3.3.3-r0)
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20 owned by libretls-3.3.3-r0.
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20.0.3 owned by libretls-3.3.3-r0.
(5/10) Installing libressl (3.3.3-r0)

@Diman0
Copy link
Member

Diman0 commented Jul 5, 2021

This is a defect which is reported at alpine:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/12763#note_163217

They plan to include a fix in 3.14.1 which is scheduled in 8 days (according to the milestone)
https://gitlab.alpinelinux.org/alpine/aports/-/milestones/178

We could wait until 3.14.1 is released. Or perhaps it is possible to use an older version of the package?

@nextgens
Copy link
Contributor Author

nextgens commented Jul 5, 2021

Let's wait; I'll revisit it in a week or so

@nextgens nextgens added the status/blocked This will block mergify until the label is removed. label Jul 5, 2021
@Erriez Erriez mentioned this pull request Jul 24, 2021
2 tasks
@Erriez
Copy link
Contributor

Erriez commented Jul 24, 2021

New release date Alpine 3.14.1 is planned for Aug 1, 2021.

A temporary workaround is probably using Alpine 3.13 to build ARM images.

@nextgens
Copy link
Contributor Author

build ARM images.

IMHO ARM images should be build using the same base image as the rest... unless there is a good reason for them to be different.

We will use 3.14.1 when it's available

@Diman0
Copy link
Member

Diman0 commented Aug 3, 2021

The alpine 3.14.1 milestone has been violated again. It appears to show that no work has happened at all. All issues still have the same status. It might take months before the next alpine version is released.

As a workaround we could try using openssl instead of libressl.

@nextgens
Copy link
Contributor Author

nextgens commented Aug 3, 2021

bors try

bors bot added a commit that referenced this pull request Aug 3, 2021
@bors
Copy link
Contributor

bors bot commented Aug 3, 2021

try

Build failed:

@nextgens
Copy link
Contributor Author

nextgens commented Aug 3, 2021

bors try

bors bot added a commit that referenced this pull request Aug 3, 2021
@nextgens nextgens removed the status/blocked This will block mergify until the label is removed. label Aug 3, 2021
@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2021

Thanks for submitting this pull request.
Bors-ng will now build test images. When it succeeds, we will continue to review and test your PR.

bors try

Note: if this build fails, read this.

@bors
Copy link
Contributor

bors bot commented Aug 3, 2021

try

Already running a review

@bors
Copy link
Contributor

bors bot commented Aug 3, 2021

try

Build failed:

@nextgens
Copy link
Contributor Author

nextgens commented Aug 3, 2021

bors try

bors bot added a commit that referenced this pull request Aug 3, 2021
@bors
Copy link
Contributor

bors bot commented Aug 3, 2021

try

Build succeeded:

@Erriez
Copy link
Contributor

Erriez commented Aug 3, 2021

The alpine 3.14.1 milestone has been violated again. It appears to show that no work has happened at all. All issues still have the same status. It might take months before the next alpine version is released.

I'm testing with python:3.8-alpine3.14 locally for almost all images. Reason is that Python and PIP are already installed on alpine which saves Docker build time. They are also officially supported and maintained by Python Docker community.

As a workaround we could try using openssl instead of libressl.

Build successful locally using openssl instead of libressl, including removal of cyrus-sasl-plain which is no longer supported for Alpine >= 3.13. Need some testing.

The download / PIP3 upgrade takes a lot of time in total, even when using an optimized cached build. Is there a good reason to upgrade PIP every time, even when using a recent Python image?

@nextgens
Copy link
Contributor Author

nextgens commented Aug 3, 2021

The download / PIP3 upgrade takes a lot of time in total, even when using an optimized cached build. Is there a good reason to upgrade PIP every time, even when using a recent Python image?

No. Since this PR is meant to be backported I went for the least intrusive changes I could... but there is no reason for it.

Copy link
Member

@Diman0 Diman0 left a comment

Choose a reason for hiding this comment

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

lgtm

@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 4, 2021

Build succeeded:

@bors bors bot merged commit a226392 into Mailu:master Aug 4, 2021
@nextgens
Copy link
Contributor Author

nextgens commented Aug 5, 2021

@Mergifyio backport 1.8

@mergify
Copy link
Contributor

mergify bot commented Aug 5, 2021

Command backport 1.8: success

Backports have been created

  • Backport to branch 1.8 not needed, change already in branch 1.8

@Erriez Erriez mentioned this pull request Aug 5, 2021
2 tasks
bors bot added a commit that referenced this pull request Aug 5, 2021
1908: Optimize docs/Dockerfile r=mergify[bot] a=Erriez

- Convert .rst to .html in temporary `python:3.8-alpine3.14` build image
- Remove all unused packages
- Use `nginx:1.21-alpine` deployment image

## What type of PR?

Optimize/fix `docs/Dockerfile`

## What does this PR do?

### Related issue(s)
- Mention an issue like: #1851

## Prerequistes
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.

## Testing

The following tests has been executed locally:

```bash
export DOCKER_ORG=user
export DOCKER_PREFIX=
export MAILU_VERSION=master

cd tests
time docker-compose -f build.yml build --no-cache docs
	real	0m18.850s
	user	0m0.317s
	sys	0m0.124s

docker images
	REPOSITORY                   TAG               IMAGE ID       CREATED              SIZE
	user/docs                    master            3de6c8612cf3   19 seconds ago       38.1MB

docker run -it --rm --name mailu-docs -p 80:80 user/docs:master

Open web browser:
	Clear caches
	http://localhost:80/master
```

Co-authored-by: Erriez <Erriez@users.noreply.github.com>
bors bot added a commit that referenced this pull request Aug 5, 2021
1906: Backport of #1851 r=mergify[bot] a=nextgens

mergify seems to have a problem with it so here it is...

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
@nextgens nextgens deleted the upgrade-alpine branch October 31, 2021 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/backport Automatic backport this PR to the current stable release type/security Related to security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants