fc icon indicating copy to clipboard operation
fc copied to clipboard

custom 本地镜像和线上不统一

Open wss-git opened this issue 3 years ago • 3 comments

用户 apt-get.list 文件如下,使用 s build --use-docker 报错。

libreoffice
imagemagick

构建 测试 伪代码:

'use strict';

const { sync: commandExistsSync } = require('command-exists');
const express = require('express');

const app = express();

app.get('*', (req, res) => {
    res.send(`convert: ${commandExistsSync('convert')}
soffice: ${commandExistsSync('soffice')}`)
});

app.listen(9000, () => {
    console.log('start success.');
}).on('error', (e) => {
    console.error(e.code, e.message)
})

线上运行返回都是 false(命令不存在),local start 运行返回 soffice不存在 但是 convert 存在

wss-git avatar Jul 13 '22 01:07 wss-git

libreoffice 这个包地址:http://devsapp.functioncompute.com/devsapp/libreoffice-layer.zip

环境变量

          LD_LIBRARY_PATH: /opt/root/usr/lib/libreoffice/program:/opt/root/usr/local/lib:/opt/root/usr/lib:/opt/root/usr/lib/x86_64-linux-gnu:/opt/root/usr/lib64:/opt/root/lib:/opt/root/lib/x86_64-linux-gnu
          PATH: /opt/root/usr/local/bin:/opt/root/usr/local/sbin:/opt/root/usr/bin:/opt/root/usr/sbin:/opt/root/sbin:/opt/root/bin

wss-git avatar Jul 13 '22 06:07 wss-git

用户 apt-get.list 文件如下,使用 s build --use-docker 报错。

libreoffice
imagemagick

构建 测试 伪代码:

'use strict';

const { sync: commandExistsSync } = require('command-exists');
const express = require('express');

const app = express();

app.get('*', (req, res) => {
    res.send(`convert: ${commandExistsSync('convert')}
soffice: ${commandExistsSync('soffice')}`)
});

app.listen(9000, () => {
    console.log('start success.');
}).on('error', (e) => {
    console.error(e.code, e.message)
})

线上运行返回都是 false(命令不存在),local start 运行返回 soffice不存在 但是 convert 存在

测试 node、python、java 都存在 imagemagick 包,仅 custom 线上不存在,应是线上遗漏了

wss-git avatar Jul 13 '22 06:07 wss-git

custom runtime 的 imagemagick 的 layer 正在制作中

rsonghuster avatar Jul 13 '22 09:07 rsonghuster