-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-alpine
71 lines (65 loc) · 2.86 KB
/
Dockerfile-alpine
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
FROM node:18.19.1-alpine
LABEL MAINTAINER="MiaoWoo(admin@yumc.pw)"
# Java alpine default install at /usr/lib/jvm/default-jvm
ENV JAVA_HOME=/usr/lib/jvm/default-jvm \
# Golang alpine default install at /usr/lib/go
GOROOT=/usr/lib/go \
# Rust
RUSTUP_HOME=/root/.rustup \
CARGO_HOME=/root/.cargo \
SHELL=/bin/zsh \
PHP_VERSION=81
##GO
#Required to use go get with git source
RUN apk add --no-cache \
alpine-sdk libstdc++ libc6-compat \
# Base Package
git ttf-freefont tzdata ca-certificates \
zsh tmux nano bash tzdata openssh openssl curl inotify-tools \
# Build tools
make g++ libx11-dev libxkbfile-dev libsecret libsecret-dev krb5-dev \
# Go
go musl-dev \
# Java
maven gradle \
# Python
python3 python3-dev py3-pip \
# PHP \
php${PHP_VERSION} php${PHP_VERSION}-xml php${PHP_VERSION}-zip php${PHP_VERSION}-dom \
php${PHP_VERSION}-json php${PHP_VERSION}-phar php${PHP_VERSION}-zlib php${PHP_VERSION}-curl \
php${PHP_VERSION}-gd php${PHP_VERSION}-ctype php${PHP_VERSION}-iconv php${PHP_VERSION}-openssl php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-fileinfo php${PHP_VERSION}-simplexml php${PHP_VERSION}-xmlwriter php${PHP_VERSION}-xmlreader php${PHP_VERSION}-tokenizer && \
# link python exec to python3
ln -sf /usr/bin/python3 /usr/bin/python && \
# link php exec to php${PHP_VERSION}
ln -sf /usr/bin/php${PHP_VERSION} /usr/bin/php && \
# config nodejs
# npm config set python python3 && \
corepack enable && \
corepack prepare pnpm@latest --activate
# Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -v \
&& source "${CARGO_HOME}/env" \
&& rustup default stable
# Python
RUN pip install --break-system-packages python-language-server autopep8 pylint
# PHP
RUN curl -s -o composer-setup.php https://getcomposer.org/installer \
&& php composer-setup.php --install-dir=/usr/bin --filename=composer \
&& rm composer-setup.php \
# PHP-CS-Fixer
&& mkdir -p /usr/local/php-cs-fixer \
&& composer require --working-dir=/usr/local/php-cs-fixer friendsofphp/php-cs-fixer \
&& ln -sf /usr/local/php-cs-fixer/vendor/bin/php-cs-fixer /usr/bin/php-cs-fixer
# Install Tmux Config & On-My-ZSH
RUN set -ex && \
mkdir ~/.tmux && \
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && \
wget -qO- https://raw.githubusercontent.com/502647092/Dockerfile/master/development/tmux.conf > ~/.tmux.conf && \
~/.tmux/plugins/tpm/bin/install_plugins && \
git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh && \
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc && \
sed -i s@ZSH_THEME=\"robbyrussell\"@ZSH_THEME=\"ys\"@g ~/.zshrc && \
echo 'alias tmux="tmux -u"' >> ~/.zshrc && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone