FROM gcr.io/distroless/base-debian11

# Ugly hack to fix: https://github.com/GoogleContainerTools/distroless/issues/225
COPY --from=amd64/busybox:stable /bin/busybox /busybox
RUN ["/busybox", "--install", "/bin"]

COPY allCAs.pem /allCAs.pem
COPY mime.types /etc/mime.types

RUN set -xe && \
    cat /allCAs.pem >> /etc/ssl/certs/ca-certificates.crt && \
    echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
    ln -snf /usr/share/zoneinfo/Europe/Moscow /etc/localtime && \
    echo "Europe/Moscow" > /etc/timezone

FROM gcr.io/distroless/base-debian11
MAINTAINER Andrew Krasichkov "buglloc@yandex-team.ru"

COPY --from=0 /etc /etc
COPY --from=0 /bin /bin

