This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsnippet.Dockerfile
38 lines (31 loc) · 1.79 KB
/
snippet.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
########### debian 更新镜像源 ############
# gpg 导入公钥,说明见: https://unix.stackexchange.com/questions/274053/whats-the-best-way-to-install-apt-packages-from-debian-stretch-on-raspbian-jess
RUN echo " " > /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian jessie main" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian jessie-updates main" >> /etc/apt/sources.list && \
gpg --keyserver keyserver.ubuntu.com --recv-key 7638D0442B90D010 && \
gpg -a --export 7638D0442B90D010 | apt-key add - && \
apt-get update
# 不过在安装 curl 的时候,可能遇到 libcurl4 and libcurl3 的问题,参考 https://forum.vestacp.com/viewtopic.php?t=18201
############# debian 结束 #################
# apt install -y language-pack-zh-hans
# 开发环境可以不清理
# apt clean && apt autoclean && apt -y autoremove && \
# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# lrzsz: window / linux 互传文件:
###########################################################
# C++ #
###########################################################
# bazel
# 参考: https://docs.bazel.build/versions/master/install-ubuntu.html#install-with-installer-ubuntu
# buildifier 检查和格式化 WORKSPACE .bzl BUILD 文件
# 然后在setting.json中设置
# "bazel.buildifierExecutable": "/usr/local/bin/buildifier-linux-amd64",
ADD cache/bazel-4.0.0-installer-linux-x86_64.sh /tmp
ADD cache/buildifier-linux-amd64 /usr/local/bin
RUN apt update && \
apt-get install -y openjdk-11-jdk && \
chmod +x /tmp/bazel-4.0.0-installer-linux-x86_64.sh && \
bash /tmp/bazel-4.0.0-installer-linux-x86_64.sh && \
chmod +x /usr/local/bin/buildifier-linux-amd64 && \
apt clean && rm -rf /tmp/*