-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile-dev
More file actions
22 lines (18 loc) · 961 Bytes
/
Dockerfile-dev
File metadata and controls
22 lines (18 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM golang:1.22.10-bullseye
LABEL authors="heige"
# 设置环境变量
ENV LANG="zh_CN.UTF-8"
# 设置nodejs版本
ENV NODEJS_VERSION=20
# 设置deb镜像源,这里我使用aliyun的镜像
RUN echo "deb http://mirrors.aliyun.com/debian bullseye main" > /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian-security bullseye-security main" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian bullseye-updates main" >> /etc/apt/sources.list && \
apt-get update && apt-get install -y ca-certificates gcc cmake make libtool vim bash curl net-tools wget \
git net-tools protobuf-compiler apt-transport-https && \
curl -fsSL https://deb.nodesource.com/setup_$NODEJS_VERSION.x -o nodesource_setup.sh && \
chmod +x ./nodesource_setup.sh && \
./nodesource_setup.sh && apt-get install nodejs -y \
&& update-ca-certificates && apt-get clean && \
rm -rf /var/lib/apt/lists/*
CMD ["bash"]