fix: update quest image name

This commit is contained in:
wancat committed 2023-11-18 22:25:05 +08:00
1 parent aed66a4fe5
commit f9e0fade3b
8 files changed
+26 -16

No files matched your search

+5 -5
View File
@@ -1,5 +1,5 @@
import Docker from 'dockerode'
import config from '../config.js'
import config, { getQuestImage } from '../config.js'
const engine = new Docker()
@@ -11,17 +11,17 @@ const containerOptions = {
OpenStdin: true,
StdinOnce: false,
HostConfig: {
NetworkMode: config.dockerNetwork,
NetworkMode: config.docker.network,
},
}
// const network = engine.getNetwork(config.dockerNetwork)
export function createContainer(name, tag) {
export function createContainer(name, questId) {
const option = {
...containerOptions,
name,
Image: `${config.dockerImage}:${tag}`,
Image: getQuestImage(questId),
}
if (!config.isProduction && config.hostPwd && config.mountQuest) {
option.HostConfig.Bind = [
@@ -87,7 +87,7 @@ export function buildQuestImage(questPath, questId) {
src: ['Dockerfile', 'home'],
},
{
t: `${config.dockerImage}:${questId}`,
t: getQuestImage(questId),
networkmode: 'none',
memory: 10 * 1e6,
},