-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
112 lines (97 loc) · 2.63 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FROM ubuntu:18.04
ENV TZ=UTC
WORKDIR /root
RUN export LC_ALL=C.UTF-8
RUN DEBIAN_FRONTEND=noninteractive
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update
RUN apt-get install -y \
sudo \
autoconf \
autogen \
language-pack-en-base \
wget \
zip \
unzip \
curl \
rsync \
ssh \
openssh-client \
git \
build-essential \
apt-utils \
software-properties-common \
nasm \
libjpeg-dev \
libpng-dev \
libpng16-16 \
strace
RUN apt-get install -y linkchecker
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
# PHP
RUN LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php && apt-get update && apt-get install -y php8.1
RUN apt-get install -y \
php8.1-curl \
php8.1-gd \
php8.1-dev \
php8.1-xml \
php8.1-bcmath \
php8.1-mysql \
php8.1-mbstring \
php8.1-zip \
php8.1-bz2 \
php8.1-sqlite \
php8.1-soap \
php8.1-intl \
php8.1-imap \
php8.1-imagick
RUN command -v php
# Composer
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer && \
chmod +x /usr/local/bin/composer && \
composer self-update --preview
RUN command -v composer
# RUN
# Node.js
RUN curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
RUN apt-get install nodejs -y
RUN command -v node
# Other
RUN mkdir ~/.ssh
RUN touch ~/.ssh_config
# CKL: the following are added so we can circumvent the error
## ---
## npm ERR! code EACCES
## npm ERR! syscall mkdir
## npm ERR! path /.npm
## npm ERR! errno -13
## npm ERR!
## npm ERR! Your cache folder contains root-owned files, due to a bug in
## npm ERR! previous versions of npm which has since been addressed.
## ---
# This has the drawback that the requirements are statically fixed inside the Dockerfile but can be cached by Docker itself
RUN mkdir .npm
RUN chmod -R 777 .npm
RUN npm install npm
RUN mkdir .composer
RUN chmod -R 777 .composer
RUN npm install -g --force npx
RUN composer global require daux/daux.io
#RUN mv ~/.composer .
RUN chmod -R 777 .composer
RUN ln -s /root/.config/composer/vendor/bin/daux /usr/local/bin/daux
RUN chmod +x /usr/local/bin/daux
# we have to create a new directory which is used, otherwise the "npx crafty run" command won't finish at all as it would scan the whole filesystems below "/"
WORKDIR /root/build
RUN mkdir .npm
RUN chmod -R 777 .npm
RUN mkdir .composer
RUN chmod -R 777 .composer
# Display versions installed
RUN php -v
RUN composer --version
RUN node -v
RUN ls -al /usr/local/bin