-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
32 lines (24 loc) · 1.05 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
FROM crystallang/crystal:1.1.0-alpine-build as build-image
ENV MUSL_LOCPATH /usr/share/i18n/locales/musl
ENV MUSL_LOCALE_DEPS cmake make musl-dev gcc gettext-dev libintl
RUN apk add --no-cache --update \
$MUSL_LOCALE_DEPS \
&& wget https://gitlab.com/rilian-la-te/musl-locales/-/archive/master/musl-locales-master.zip \
&& unzip musl-locales-master.zip \
&& cd musl-locales-master \
&& cmake -DLOCALE_PROFILE=OFF -D CMAKE_INSTALL_PREFIX:PATH=/usr . && make && make install
WORKDIR /usr/local/
RUN git clone https://github.com/luckyframework/lucky_cli && \
cd lucky_cli && \
git checkout v0.28.0 --quiet && \
shards install
WORKDIR /usr/local/lucky_cli
RUN crystal build src/lucky.cr -o /usr/local/bin/lucky
FROM crystallang/crystal:1.1.0-alpine as runtime-image
RUN apk add --no-cache --update postgresql-client
COPY --from=build-image /usr/local/bin/lucky /usr/local/bin/lucky
COPY --from=build-image /usr/share/i18n/locales/musl /usr/share/i18n/locales/musl
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
EXPOSE 5000