-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (59 loc) · 3.17 KB
/
Dockerfile
File metadata and controls
70 lines (59 loc) · 3.17 KB
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 cimg/php:8.3.31
# Make composer packages executable.
ENV PATH="/home/circleci/.composer/vendor/bin:/home/circleci/project/vendor/drush/drush:/home/circleci/project/drupal/vendor/drush/drush:${PATH}"
# Upgrade packages
RUN sudo apt update && sudo apt upgrade && sudo apt clean
# Install vim based on popular demand.
RUN sudo apt-get update && sudo apt-get install vim && sudo apt-get clean
# Add gcloud CLI and kubectl
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& sudo apt-get install apt-transport-https ca-certificates \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& sudo apt-get update && sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin kubectl \
&& sudo apt-get clean
# Install AWS cli and aws-iam-authenticator, git, python, pproxy
RUN sudo apt install -y git python3 python3-pip \
&& sudo apt-get install -y unzip curl \
&& sudo pip3 install pproxy \
&& sudo pip3 install python-daemon \
&& sudo apt remove python3-pip \
&& sudo apt-get clean \
&& sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& sudo unzip awscliv2.zip \
&& sudo ./aws/install \
&& sudo rm -rf awscliv2.zip \
&& sudo rm -rf ./aws
# Install Helm 3
# https://github.com/helm/helm/releases
ENV HELM_VERSION v3.18.4
ENV FILENAME helm-${HELM_VERSION}-linux-amd64.tar.gz
ENV HELM_URL https://get.helm.sh/${FILENAME}
# Helm unit test plugin version.
# https://github.com/helm-unittest/helm-unittest/releases
ENV HELM_UNITTEST_VERSION 1.0.0
RUN curl -o /tmp/$FILENAME ${HELM_URL} \
&& tar -zxvf /tmp/${FILENAME} -C /tmp \
&& rm /tmp/${FILENAME} \
&& sudo mv /tmp/linux-amd64/helm /bin/helm \
&& helm repo add bitnami https://charts.bitnami.com/bitnami \
# && helm repo add minio https://helm.min.io/ \
&& helm repo add wunderio https://storage.googleapis.com/charts.wdr.io \
&& helm repo add percona https://percona.github.io/percona-helm-charts/ \
&& helm plugin install https://github.com/helm-unittest/helm-unittest --version ${HELM_UNITTEST_VERSION}
# Install Node.js and Yarn.
# The following code is based on the CircleCI Node.js Dockerfile template:
# https://github.com/CircleCI-Public/cimg-shared/blob/main/variants/node.Dockerfile.template
ENV NODE_VERSION 20.20.2
RUN echo "Installing Node.js version ${NODE_VERSION}"
RUN curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" && \
sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \
rm node.tar.xz && \
sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs
ENV YARN_VERSION 1.22.22
RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \
sudo tar -xzf yarn.tar.gz -C /opt/ && \
rm yarn.tar.gz && \
sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \
sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg
# Add custom php config and lift memory limit.
COPY conf/php/memory.ini /usr/local/etc/php/conf.d/memory.ini