58 lines
1.5 KiB
Docker
58 lines
1.5 KiB
Docker
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
|
|||
|
|
|||
|
# set version label
|
|||
|
ARG BUILD_DATE
|
|||
|
ARG VERSION
|
|||
|
ARG CODE_RELEASE
|
|||
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|||
|
LABEL maintainer="aptalca"
|
|||
|
|
|||
|
# environment settings
|
|||
|
ARG DEBIAN_FRONTEND="noninteractive"
|
|||
|
ENV HOME="/config"
|
|||
|
|
|||
|
RUN \
|
|||
|
echo "**** install runtime dependencies ****" && \
|
|||
|
apt-get update && \
|
|||
|
apt-get install -y \
|
|||
|
git \
|
|||
|
jq \
|
|||
|
libatomic1 \
|
|||
|
nano \
|
|||
|
net-tools \
|
|||
|
netcat \
|
|||
|
# 安装python nodejs
|
|||
|
python3 \
|
|||
|
python3-pip \
|
|||
|
nodejs \
|
|||
|
npm \
|
|||
|
sudo && \
|
|||
|
echo "**** install code-server ****" && \
|
|||
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
|||
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
|||
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
|||
|
fi && \
|
|||
|
mkdir -p /app/code-server && \
|
|||
|
curl -o \
|
|||
|
/tmp/code-server.tar.gz -L \
|
|||
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
|
|||
|
tar xf /tmp/code-server.tar.gz -C \
|
|||
|
/app/code-server --strip-components=1 && \
|
|||
|
echo "**** clean up ****" && \
|
|||
|
apt-get clean && \
|
|||
|
rm -rf \
|
|||
|
/config/* \
|
|||
|
/tmp/* \
|
|||
|
/var/lib/apt/lists/* \
|
|||
|
/var/tmp/*
|
|||
|
|
|||
|
# 安装达梦数据库
|
|||
|
RUN mkdir -p /opt/dm8.zip && \
|
|||
|
wget -O root/opt/dm8.zip https://download.dameng.com/eco/adapter/DM8/202401END/dm8_20240408_x86_rh7_64.zip
|
|||
|
|
|||
|
# add local files
|
|||
|
COPY /root /
|
|||
|
|
|||
|
# ports and volumes
|
|||
|
EXPOSE 8443
|