-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
87 lines (71 loc) · 2.51 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ARG DOCKER_VERSION=latest
FROM alpine:latest AS downloader
RUN apk add --no-cache \
curl \
&& rm -rf /var/cache/apk/*
WORKDIR /usr/local/bin/
ARG DOCKER_MACHINE_VERSION=v0.14.0
ARG DOCKER_MACHINE_SHA256=a4c69bffb78d3cfe103b89dae61c3ea11cc2d1a91c4ff86e630c9ae88244db02
ENV DOCKER_MACHINE_URL=https://github.com/docker/machine/releases/download/${DOCKER_MACHINE_VERSION}
RUN curl -sLo docker-machine ${DOCKER_MACHINE_URL}/docker-machine-`uname -s`-`uname -m` \
&& echo "$DOCKER_MACHINE_SHA256 *docker-machine" | sha256sum -c - \
&& chmod +x docker-machine
ARG MANIFEST_TOOL_VERSION="v0.7.0/manifest-tool-linux-amd64"
ENV MANIFEST_TOOL_BASE_URL=https://github.com/estesp/manifest-tool/releases/download
RUN echo "${MANIFEST_TOOL_BASE_URL}/${MANIFEST_TOOL_VERSION}" \
&& curl -sLo manifest-tool ${MANIFEST_TOOL_BASE_URL}/${MANIFEST_TOOL_VERSION} \
&& chmod +x manifest-tool
ARG OPENFAASCLI_VERSION=0.6.4
ARG OPENFAASCLI_SHA256
ENV OPENFAASCLI_URL=https://github.com/openfaas/faas-cli/releases/download/${OPENFAASCLI_VERSION}/faas-cli
RUN curl -fsSLo faas-cli ${OPENFAASCLI_URL} \
&& echo "${OPENFAASCLI_SHA256} *faas-cli" | sha256sum -c - \
&& chmod +x faas-cli
FROM docker:$DOCKER_VERSION
RUN apk add --no-cache \
bash \
bind-tools \
ca-certificates \
curl \
gettext \
git \
jq \
lftp \
make \
openssh-client \
rsync
RUN apk add --no-cache \
alpine-sdk \
gcc \
libffi-dev \
openssl-dev \
py3-pip \
python3 \
python3-dev \
&& pip3 install --upgrade pip
RUN pip3 install awscli
RUN ls -l /usr/local/bin/
#ARG DOCKER_COMPOSE_VERSION=1.20.1
#ARG DOCKER_COMPOSE_SHA256
#ENV DOCKER_COMPOSE_URL=https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}
#RUN curl -sLo docker-compose ${DOCKER_COMPOSE_URL}/docker-compose-`uname -s`-`uname -m` \
# && echo "$DOCKER_COMPOSE_SHA256 *docker-compose" | sha256sum -c - \
# && chmod +x docker-compose
# install docker-compose via pip because of musl vs libc6
#ARG DOCKER_COMPOSE_VERSION=1.20.1
#RUN pip3 install docker-compose==$DOCKER_COMPOSE_VERSION
# copy precompiled docker-compose (linked to musl to work with alpine)
COPY docker-compose /usr/local/bin/docker-compose
ENV SHELL=/bin/bash
COPY --from=downloader /usr/local/bin/ /usr/local/bin/
RUN { \
docker-machine version; \
docker-compose version; \
docker version || true; \
faas-cli version || true; \
manifest-tool --version || true; \
}
WORKDIR /root
ENTRYPOINT []
CMD ["/bin/bash"]
COPY fs/ /