-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
64 lines (57 loc) · 1.3 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
FROM alpine:latest AS resource
RUN apk add --no-cache \
--update \
openssl \
libcurl \
libxml2 \
libssh-dev \
libressl-dev \
libxml2-dev \
curl-dev \
pinentry \
xclip \
git \
make \
cmake \
g++ \
bash \
bash-completion \
coreutils
RUN git clone https://github.com/lastpass/lastpass-cli
WORKDIR /lastpass-cli
RUN make install
WORKDIR /
RUN rm -rf lastpass-cli \
&& apk del curl-dev xclip cmake
# latest released jq version 1.6 does not contain https://github.com/stedolan/jq/pull/1752 => build from master
RUN apk add --no-cache \
--update \
flex \
bison \
libtool \
automake \
autoconf
RUN git clone https://github.com/stedolan/jq.git
WORKDIR /jq
RUN git submodule update --init \
&& autoreconf -fi \
&& ./configure --with-oniguruma=builtin \
&& make -j8 \
&& make check \
&& make LDFLAGS=-all-static \
&& make install
WORKDIR /
RUN rm -rf jq \
&& apk del flex bison libtool make automake autoconf g++
FROM resource AS tests
RUN apk add coreutils ncurses curl
RUN curl -#L https://github.com/bats-core/bats-core/archive/master.zip | unzip - \
&& bash bats-core-master/install.sh /usr/local \
&& rm -rf ./bats-core-master
ENV TERM xterm-256color
COPY . /lastpass-resource
WORKDIR /lastpass-resource/test
RUN bats .
FROM resource
COPY assets/* /opt/resource/
RUN chmod +x /opt/resource/*