mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修改 apt 命令
This commit is contained in:
parent
c0d93fc3f8
commit
a2bfc2f2e8
|
@ -36,19 +36,19 @@ export const LINUX_DEPENDENCE_COMMAND: Record<
|
||||||
}
|
}
|
||||||
> = {
|
> = {
|
||||||
Debian: {
|
Debian: {
|
||||||
install: 'apt install -y',
|
install: 'apt-get install -y',
|
||||||
uninstall: 'apt remove -y',
|
uninstall: 'apt-get remove -y',
|
||||||
info: 'apt info',
|
info: 'dpkg-query -s',
|
||||||
check(info: string) {
|
check(info: string) {
|
||||||
return info.includes('apt-manual-installed');
|
return info.includes('install ok installed');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Ubuntu: {
|
Ubuntu: {
|
||||||
install: 'apt install -y',
|
install: 'apt-get install -y',
|
||||||
uninstall: 'apt remove -y',
|
uninstall: 'apt-get remove -y',
|
||||||
info: 'apt info',
|
info: 'dpkg-query -s',
|
||||||
check(info: string) {
|
check(info: string) {
|
||||||
return info.includes('apt-manual-installed');
|
return info.includes('install ok installed');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Alpine: {
|
Alpine: {
|
||||||
|
|
|
@ -663,7 +663,7 @@ async function _updateLinuxMirror(
|
||||||
currentDomainWithScheme,
|
currentDomainWithScheme,
|
||||||
mirrorDomainWithScheme || 'http://deb.debian.org',
|
mirrorDomainWithScheme || 'http://deb.debian.org',
|
||||||
);
|
);
|
||||||
return 'apt update';
|
return 'apt-get update';
|
||||||
} else {
|
} else {
|
||||||
throw Error(`Current mirror domain not found.`);
|
throw Error(`Current mirror domain not found.`);
|
||||||
}
|
}
|
||||||
|
@ -676,7 +676,7 @@ async function _updateLinuxMirror(
|
||||||
currentDomainWithScheme,
|
currentDomainWithScheme,
|
||||||
mirrorDomainWithScheme || 'http://archive.ubuntu.com',
|
mirrorDomainWithScheme || 'http://archive.ubuntu.com',
|
||||||
);
|
);
|
||||||
return 'apt update';
|
return 'apt-get update';
|
||||||
} else {
|
} else {
|
||||||
throw Error(`Current mirror domain not found.`);
|
throw Error(`Current mirror domain not found.`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ COPY --from=nodebuilder /usr/local/bin/node /usr/local/bin/
|
||||||
COPY --from=nodebuilder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
|
COPY --from=nodebuilder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
||||||
apt update && \
|
apt-get update && \
|
||||||
apt install --no-install-recommends -y libatomic1 && \
|
apt-get install --no-install-recommends -y libatomic1 && \
|
||||||
npm i -g pnpm@8.3.1 && \
|
npm i -g pnpm@8.3.1 && \
|
||||||
cd /tmp/build && \
|
cd /tmp/build && \
|
||||||
pnpm install --prod
|
pnpm install --prod
|
||||||
|
@ -31,9 +31,9 @@ COPY --from=nodebuilder /usr/local/lib/node_modules/. /usr/local/lib/node_module
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
||||||
apt update && \
|
apt-get update && \
|
||||||
apt upgrade -y && \
|
apt-get upgrade -y && \
|
||||||
apt install --no-install-recommends -y git \
|
apt-get install --no-install-recommends -y git \
|
||||||
curl \
|
curl \
|
||||||
wget \
|
wget \
|
||||||
tzdata \
|
tzdata \
|
||||||
|
@ -46,7 +46,7 @@ RUN set -x && \
|
||||||
netcat \
|
netcat \
|
||||||
unzip \
|
unzip \
|
||||||
libatomic1 && \
|
libatomic1 && \
|
||||||
apt clean && \
|
apt-get clean && \
|
||||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||||
echo "Asia/Shanghai" >/etc/timezone && \
|
echo "Asia/Shanghai" >/etc/timezone && \
|
||||||
git config --global user.email "qinglong@users.noreply.github.com" && \
|
git config --global user.email "qinglong@users.noreply.github.com" && \
|
||||||
|
|
|
@ -6,8 +6,8 @@ COPY --from=nodebuilder /usr/local/bin/node /usr/local/bin/
|
||||||
COPY --from=nodebuilder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
|
COPY --from=nodebuilder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
||||||
apt update && \
|
apt-get update && \
|
||||||
apt install --no-install-recommends -y libatomic1 && \
|
apt-get install --no-install-recommends -y libatomic1 && \
|
||||||
npm i -g pnpm@8.3.1 && \
|
npm i -g pnpm@8.3.1 && \
|
||||||
cd /tmp/build && \
|
cd /tmp/build && \
|
||||||
pnpm install --prod
|
pnpm install --prod
|
||||||
|
@ -32,9 +32,9 @@ COPY --from=nodebuilder /usr/local/lib/node_modules/. /usr/local/lib/node_module
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
||||||
ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx && \
|
ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx && \
|
||||||
apt update && \
|
apt-get update && \
|
||||||
apt upgrade -y && \
|
apt-get upgrade -y && \
|
||||||
apt install --no-install-recommends -y git \
|
apt-get install --no-install-recommends -y git \
|
||||||
curl \
|
curl \
|
||||||
wget \
|
wget \
|
||||||
tzdata \
|
tzdata \
|
||||||
|
@ -47,7 +47,7 @@ RUN set -x && \
|
||||||
netcat \
|
netcat \
|
||||||
unzip \
|
unzip \
|
||||||
libatomic1 && \
|
libatomic1 && \
|
||||||
apt clean && \
|
apt-get clean && \
|
||||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||||
echo "Asia/Shanghai" >/etc/timezone && \
|
echo "Asia/Shanghai" >/etc/timezone && \
|
||||||
git config --global user.email "qinglong@users.noreply.github.com" && \
|
git config --global user.email "qinglong@users.noreply.github.com" && \
|
||||||
|
|
|
@ -13,7 +13,7 @@ os_name=$(source /etc/os-release && echo "$ID")
|
||||||
if [[ $os_name == 'alpine' ]]; then
|
if [[ $os_name == 'alpine' ]]; then
|
||||||
apk --no-cache add -f zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev
|
apk --no-cache add -f zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev
|
||||||
elif [[ $os_name == 'debian' ]] || [[ $os_name == 'ubuntu' ]]; then
|
elif [[ $os_name == 'debian' ]] || [[ $os_name == 'ubuntu' ]]; then
|
||||||
apt install -y gcc python3-dev musl-dev
|
apt-get install -y gcc python3-dev musl-dev
|
||||||
else
|
else
|
||||||
echo -e "暂不支持此系统 $os_name"
|
echo -e "暂不支持此系统 $os_name"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -46,8 +46,8 @@ if [[ $os_name == 'alpine' ]]; then
|
||||||
procps \
|
procps \
|
||||||
netcat-openbsd
|
netcat-openbsd
|
||||||
elif [[ $os_name == 'debian' ]] || [[ $os_name == 'ubuntu' ]]; then
|
elif [[ $os_name == 'debian' ]] || [[ $os_name == 'ubuntu' ]]; then
|
||||||
apt update
|
apt-get update
|
||||||
apt install -y git curl wget tzdata perl openssl jq nginx procps netcat-openbsd openssh-client
|
apt-get install -y git curl wget tzdata perl openssl jq nginx procps netcat-openbsd openssh-client
|
||||||
else
|
else
|
||||||
echo -e "暂不支持此系统部署 $os_name"
|
echo -e "暂不支持此系统部署 $os_name"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user