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

feat(alpine-node-nginx): add slim versions #198

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

heymdall-legal
Copy link
Collaborator

Добавлена "компактная" версия базового докер-образа.

За счет отказа от нескольких лишних модулей nginx удалось убрать около 50 бинарных зависимостей ну и плюсом срезать размер образа - 136 мб против 160.

Из базового так же удалены совсем уж лишние модули nginx - webdav, стриминг flv и прочее.

Тег для новых образов будет с постфиксом -slim, так что обновляться на него нужно будет осознано. Часть проектов все же используют ssl модули, поэтому ломать им их работающую сборку не хочется.

Copy link

changeset-bot bot commented Mar 27, 2024

🦋 Changeset detected

Latest commit: 6b21b31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
arui-scripts-docker Minor
arui-scripts Minor
example-modules Patch
example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

{ node: 20.11.1, alpine: 3.19, image: node, dockerfile: Dockerfile, tag: 20.11.1 },

{ node: 16.20.2, alpine: 3.18, image: node, dockerfile: Dockerfile-slim, tag: 16.20.2-slim },
{ node: 18.19.1, alpine: 3.19, image: node, dockerfile: Dockerfile-slim, tag: 18.19.1-slim },

Choose a reason for hiding this comment

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

лучше сразу 18.20.0, чтобы реже обновлять


Список доступных версий образа:
- 16.20.2, 16.20.2-slim
- 18.19.1, 18.19.1-slim

Choose a reason for hiding this comment

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

18.20.0, 18.20.0-slim


### Локальная сборка контейнера
Если вы хотите собрать локально, выполните

```sh
docker build --build-arg NODE_VERSION=14.17.6 --build-arg ALPINE_VERSION=3.16 -t alfabankui/arui-scripts:14.17.6 .
docker build --build-arg NODE_VERSION=18.19.0 --build-arg ALPINE_VERSION=3.19 -t alfabankui/arui-scripts:14.17.6 .

Choose a reason for hiding this comment

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

NODE_VERSION=18.20.0

```

### Локальная сборка на arm-процессорах
Если у вас ноутбук на M1 - по умолчанию docker build будет собирать контейнер именно под arm архитектуру, и запустить
его на наших серверах будет невозможно. Поэтому собирать нужно немного иначе:

```sh
docker buildx build --platform linux/amd64 --build-arg NODE_VERSION=16.20.2 --build-arg ALPINE_VERSION=3.18 -t alfabankui/arui-scripts:test --load .
docker buildx build --platform linux/amd64 --build-arg NODE_VERSION=18.19.0 --build-arg ALPINE_VERSION=3.19 -t alfabankui/arui-scripts:test -f Dockerfile-slim --load .

Choose a reason for hiding this comment

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

лучше привести к одной везде версии NODE_VERSION=18.20.0

@heymdall-legal heymdall-legal merged commit ff11c46 into master Mar 28, 2024
4 checks passed
@core-ds-bot core-ds-bot mentioned this pull request Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants