/
Dockerfile
55 lines (40 loc) · 1.97 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
FROM crystallang/crystal:1.1.1
RUN apt-get update \
&& apt-get install -y libc6-dev libevent-dev libpcre2-dev libpcre3-dev libpng-dev libyaml-dev zlib1g-dev tmux curl
# Install node, yarn and dependencies
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs
RUN apt-get update && apt-get install -y cmake build-essential libssl-dev libreadline-dev libxml2-dev libcurl4-openssl-dev software-properties-common libffi-dev
RUN npm install --global yarn
# Install Postgres Client Libraries
RUN apt-get install -y postgresql-common libpq-dev postgresql-client
RUN git clone https://github.com/luckyframework/lucky_cli \
&& cd lucky_cli \
&& git checkout v0.28.0 \
&& shards install \
&& crystal build src/lucky.cr \
&& mv lucky /usr/local/bin \
&& cd .. \
&& rm -rf ./lucky_cli
# Install overmind
RUN curl -LO https://github.com/DarthSim/overmind/releases/download/v2.2.0/overmind-v2.2.0-linux-386.gz \
&& gunzip overmind-v2.2.0-linux-386.gz \
&& chmod +x overmind-v2.2.0-linux-386 \
&& mv overmind-v2.2.0-linux-386 /usr/local/bin/overmind
# Install chrome & chromedriver for Lucky Flow
RUN apt-get update && \
apt-get install -y gnupg wget curl unzip --no-install-recommends && \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
apt-get update -y && \
apt-get install -y google-chrome-stable && \
CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") && \
DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") && \
wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" && \
unzip /chromedriver/chromedriver* -d /chromedriver
#
# Put Chromedriver into the PATH
ENV PATH /chromedriver:$PATH
WORKDIR /app
EXPOSE 5000
CMD ["lucky", "-v"]