-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (57 loc) · 2.57 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
FROM node:14-alpine
# Utilities we need in .gitlab-ci.yml for example
RUN apk --update add build-base git bash openssh grep coreutils sed postgresql-client \
&& sed -i -e s:/bin/ash:/bin/bash:g /etc/passwd
RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
apk --update add sudo && \
\
echo "===> Adding Python runtime..." && \
apk --update add python python-dev py-pip libffi-dev openssl-dev openssl ca-certificates && \
apk --update add py-dnspython && \
apk --update add --virtual build-dependencies \
python-dev libffi-dev openssl-dev build-base && \
pip install --upgrade pip cffi && \
\
echo "===> Installing Ansible..." && \
pip install ansible && \
\
echo "===> Removing package list..." && \
apk del build-dependencies && \
rm -rf /var/cache/apk/* && \
\
echo "===> Adding hosts for convenience..." && \
mkdir -p /etc/ansible && \
echo 'localhost' > /etc/ansible/hosts
COPY ansible-playbook-wrapper /usr/local/bin/
# install docker client and compose
RUN apk --update add curl openrc docker \
&& rc-update add docker boot \
&& pip install docker-compose
#RUN apk --update add curl && \
# curl -L https://github.com/docker/machine/releases/download/v0.12.2/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && \
# chmod +x /tmp/docker-machine && \
# mv -f /tmp/docker-machine /usr/local/bin/docker-machine
WORKDIR /root
# install scripts
ENV BUILD_DATE 20200803001
RUN pip install requests
RUN git clone https://github.com/raarts/gitlab-ci-utils.git \
&& cd gitlab-ci-utils \
&& ./install \
&& cd .. \
&& rm -rf gitlab-ci-utils
# install ansible roles
RUN ansible-galaxy install -p /etc/ansible/roles git+https://github.com/raarts/stack-deploy
# Install expo
RUN npm install -g expo-cli
RUN npm install -g --unsafe-perm sharp-cli
# Additional utilities
RUN apk add zip unzip
COPY entrypoint.sh /usr/local/bin/
# https://github.com/docker-library/docker/pull/166
# dockerd-entrypoint.sh uses DOCKER_TLS_CERTDIR for auto-generating TLS certificates
# docker-entrypoint.sh uses DOCKER_TLS_CERTDIR for auto-setting DOCKER_TLS_VERIFY and DOCKER_CERT_PATH
# (For this to work, at least the "client" subdirectory of this path needs to be shared between the client and server containers via a volume, "docker cp", or other means of data sharing.)
ENV DOCKER_TLS_CERTDIR=/certs
ENTRYPOINT ["entrypoint.sh"]
CMD ["bash"]