-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
69 lines (48 loc) · 1.96 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM scratch
ENV MUSL_LOCPATH="/usr/share/i18n/locales/musl"
ARG BUILD_DATE
ARG ALPINE_ARCHITECTURE
ARG ALPINE_RELEASE
ARG ALPINE_VERSION
ARG ALPINE_VERSION_DATE
ADD alpine-$ALPINE_VERSION/$ALPINE_ARCHITECTURE/alpine-minirootfs-$ALPINE_VERSION-$ALPINE_ARCHITECTURE.tar.gz /
RUN apk --no-cache add cmake make musl-dev gcc gettext-dev libintl
WORKDIR /tmp
ADD musl-locales/ /tmp
RUN mkdir build && \
cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/usr && \
make && \
make install && \
locale -a
FROM scratch
ARG BUILD_DATE
ARG ALPINE_ARCHITECTURE
ARG ALPINE_RELEASE
ARG ALPINE_VERSION
ARG ALPINE_VERSION_DATE
# set our environment variable
ENV MUSL_LOCPATH="/usr/share/i18n/locales/musl"
LABEL \
maintainer="Mauro Cardillo <mauro.cardillo@gmail.com>" \
architecture="$ALPINE_ARCHITECTURE" \
alpine-version="$ALPINE_VERSION" \
build="$BUILD_DATE" \
org.opencontainers.image.title="alpine" \
org.opencontainers.image.description="Alpine Linux Docker Image with Multilanguage e Timezone support" \
org.opencontainers.image.authors="Mauro Cardillo <mauro.cardillo@gmail.com>" \
org.opencontainers.image.vendor="Mauro Cardillo" \
org.opencontainers.image.version="v$ALPINE_VERSION" \
org.opencontainers.image.url="https://hub.docker.com/r/maurosoft1973/alpine/" \
org.opencontainers.image.source="https://gitlab.com/maurosoft1973-docker/alpine" \
org.opencontainers.image.created=$BUILD_DATE
ADD alpine-$ALPINE_VERSION/$ALPINE_ARCHITECTURE/alpine-minirootfs-$ALPINE_VERSION-$ALPINE_ARCHITECTURE.tar.gz /
ENV MUSL_LOCPATH="/usr/share/i18n/locales/musl"
RUN apk --no-cache add libintl tzdata bash
COPY --from=0 /etc/profile.d/00locale.sh /etc/profile.d/00locale.sh
COPY --from=0 /usr/bin/locale /usr/bin/locale
COPY --from=0 /usr/share/locale/* /usr/share/locale/
COPY --from=0 /usr/share/i18n/locales/musl/* /usr/share/i18n/locales/musl/
COPY files /scripts/
RUN chmod -R 755 /scripts
ENTRYPOINT ["/scripts/run-alpine.sh"]