mirror of https://github.com/certd/certd
chore: 1
parent
01f61d3c73
commit
8c7f976ef5
|
@ -131,8 +131,14 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
|
||||||
if (!fs.existsSync(legoPath)) {
|
if (!fs.existsSync(legoPath)) {
|
||||||
//解压缩
|
//解压缩
|
||||||
if (os_type === "linux") {
|
if (os_type === "linux") {
|
||||||
|
//判断当前是arm64 还是amd64
|
||||||
|
const arch = process.arch;
|
||||||
|
let platform = "amd64";
|
||||||
|
if (arch === "arm64" || arch === "arm") {
|
||||||
|
platform = "arm64";
|
||||||
|
}
|
||||||
await utils.sp.spawn({
|
await utils.sp.spawn({
|
||||||
cmd: "tar -zxvf ./tools/linux/lego_*.tar.gz -C ./tools/linux/",
|
cmd: `tar -zxvf ./tools/linux/lego_linux_${platform}.tar.gz -C ./tools/linux/`,
|
||||||
});
|
});
|
||||||
this.logger.info("解压lego成功");
|
this.logger.info("解压lego成功");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -16,7 +16,7 @@ RUN apk add --no-cache openssl
|
||||||
# RUN apk add --no-cache openjdk11-jdk
|
# RUN apk add --no-cache openjdk11-jdk
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
COPY --from=builder /workspace/certd-server/ /app/
|
COPY --from=builder /workspace/certd-server/ /app/
|
||||||
RUN cd /app/tools/linux/ && ls -lh && tar -zxvf lego_linux_amd64.tar.gz
|
#RUN cd /app/tools/linux/ && ls -lh && tar -zxvf lego_linux_amd64.tar.gz
|
||||||
RUN chmod +x /app/tools/linux/*
|
RUN chmod +x /app/tools/linux/*
|
||||||
|
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
Loading…
Reference in New Issue