ED-75: Switch to debian (#27)

* ED-75: Switch to debian

* Update submodules

* Cleanup
This commit is contained in:
Sergey Yelin 2021-03-10 13:16:11 +03:00 committed by GitHub
parent 0ac24d2722
commit c0aee9a464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 7 deletions

1
.gitignore vendored
View File

@ -2,5 +2,6 @@
*.sublime-workspace
.DS_Store
Dockerfile
erlang.cfg
.image-tag

View File

@ -11,10 +11,18 @@ LABEL com.rbkmoney.${SERVICE_NAME}.parent=${BASE_IMAGE_NAME} \
com.rbkmoney.${SERVICE_NAME}.commit_id=${COMMIT} \
com.rbkmoney.${SERVICE_NAME}.commit_number=`git rev-list --count HEAD`
RUN set -xe \
&& apk add --no-cache --virtual .run-deps curl \
&& rm /var/cache/apk/*
ADD erlang.cfg /tmp
CMD ["sh"]
RUN set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl equivs \
&& cd /tmp \
&& equivs-build erlang.cfg \
&& dpkg -i erlang*.deb \
&& apt-get purge -y --auto-remove equivs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/erlang.cfg /tmp/erlang*.deb
CMD ["bash"]
EOF

View File

@ -1,7 +1,8 @@
SERVICE_NAME := service-erlang
BASE_IMAGE_NAME := library/erlang
BASE_IMAGE_TAG := 23.2.5.0-alpine
BASE_IMAGE_TAG := 23.2.7-slim
ERLANG_VERSION := $(subst -slim,,${BASE_IMAGE_TAG})
UTILS_PATH := build_utils
TEMPLATES_PATH := .
@ -33,7 +34,11 @@ $(SUBTARGETS): %/.git: %
submodules: $(SUBTARGETS)
Dockerfile: Dockerfile.sh
erlang.cfg: erlang.cfg.sh
ERLANG_VERSION=${ERLANG_VERSION} \
./erlang.cfg.sh > erlang.cfg
Dockerfile: erlang.cfg Dockerfile.sh
REGISTRY=$(REGISTRY) ORG_NAME=$(ORG_NAME) \
BASE_IMAGE_NAME=$(BASE_IMAGE_NAME) BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) \
BASE_IMAGE="$(BASE_IMAGE_NAME):$(BASE_IMAGE_TAG)" \

@ -1 +1 @@
Subproject commit 29cb2775d05d9c18c3aa74a629459cde84a2d42e
Subproject commit fc6ac0f6810b77a670036f7468575c37e5f9a829

12
erlang.cfg.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
cat <<EOF
Section: interpreters
Priority: optional
Standards-Version: 3.9.2
Package: erlang
Version: ${ERLANG_VERSION}
Maintainer: rbk.money <dev@rbk.money>
Description: Meta package for Erlang
This is virtual package used for monitoring vulnerabilities.
EOF