gpt4 book ai didi

docker - 在Docker中使用Wine进程而不附加到Shell

转载 作者:行者123 更新时间:2023-12-02 19:25:26 28 4
gpt4 key购买 nike

我正在尝试在Docker容器中运行Windows命令行程序msconvert。作者提供了一个docker镜像,使用“docker run”或连接到docker机器并从内部运行它时,它都可以正常工作。
因此,这在连接到bash shell时有效:

  • wine msconvert
  • wine / wineprefix64 / drive_c / pwiz / msconvert
  • wine64_anyuser msconvert(在容器中将wine64_anyuser定义为sudo -E -u root wine64 "$@"')

  • 我想要做的是编写一个脚本,该脚本定期使用cron使用此Windows程序。我遇到一个问题,当没有交互 session 时,似乎酒无法正常工作。

    当我尝试让容器运行cron并cron启动使用Windows程序的脚本时,就会出现问题。以下是我所拥有的。

    Dockerfile:
    FROM chambm/pwiz-skyline-i-agree-to-the-vendor-licenses AS converter


    ##### System libs setup #######################################################
    # Install needed linux tools
    RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial-cran35/" | sudo tee -a /etc/apt/sources.list && \
    gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 && \
    gpg -a --export E084DAB9 | sudo apt-key add - \
    && \
    apt-get update && \
    apt-get install -y \
    \
    r-base \
    cron \
    \
    && rm -rf /var/lib/apt

    ###############################################################################



    RUN mkdir /converter_scripts
    COPY ./setup/converter_std.R /converter_scripts/converter_std.R
    COPY ./setup/converter_std.sh /converter_scripts/converter_std.sh


    ##### R packages ##########################################################

    RUN echo 'options(repos=structure(c(CRAN="http://cran.r-project.org")))' > .Rprofile
    RUN R -e "install.packages('BiocManager');BiocManager::install('remotes')"
    RUN R -e "BiocManager::install('bnosac/cronR')"
    RUN R -e "library(cronR);cmd <- cron_rscript('/converter_scripts/converter_std.sh', cmd = '/bin/bash', rscript_log = '/var/log/converter_std.log');cron_add(cmd, frequency = '*/1 * * * *', id = 'Auto converter', description = 'Convert all new files every 1 minute')"

    Docker撰写:
      ms_converter:
    build:
    context: .
    dockerfile: ./setup/Dockerfile_converter
    target: converter
    volumes:
    - type: bind
    source: C:\Users\tmh331\Desktop\gits\QC4Metabolomics_test\data
    target: /data
    restart: always
    environment:
    TZ: Europe/Copenhagen
    msconvert_args: --filter "scanEvent 1" --mzML --zlib --64
    command: 'cron -f'

    运行R脚本的Bash脚本:
    #!/bin/bash

    [ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -n "$0" "$0" "$@" || :

    /usr/bin/Rscript '/converter_scripts/converter_std.R'

    R脚本:

    files <- list.files("/data", recursive = TRUE, include.dirs = TRUE, pattern = ".raw", full.names = TRUE)

    # sudo -E -u root wine /wineprefix64/drive_c/pwiz/msconvert
    # Xvfb $DISPLAY -nolisten tcp & wine /wineprefix64/drive_c/pwiz/msconvert
    cmd <- paste0('wine64_anyuser /wineprefix64/drive_c/pwiz/msconvert "',files,'" ', Sys.getenv("msconvert_args"), ' --outdir "',dirname(files),'"')

    sapply(cmd, system)

    错误:
    wine: created the configuration directory '/root/.wine'
    0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
    0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
    0012:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
    0012:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
    0012:err:ole:get_local_server_stream Failed: 80004002
    000b:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
    000b:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
    0014:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
    0014:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
    0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
    0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
    0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
    0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 14007
    0014:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x800736b7
    0014:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 800736b7
    0014:err:ole:get_local_server_stream Failed: 800736b7
    0010:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
    0010:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
    0016:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
    0016:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
    0018:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
    0018:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
    Could not load wine-gecko. HTML rendering will be disabled.
    0028:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
    0028:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
    002a:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
    002a:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
    Could not load wine-gecko. HTML rendering will be disabled.
    wine: configuration in '/root/.wine' has been updated.
    0009:fixme:vcruntime:__telemetry_main_invoke_trigger (0x7fe65000000)
    0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x23e4b0 1 C) semi-stub
    0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x23e520 1 C) semi-stub
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"configSections" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"dependentAssembly" in state 0
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"assemblyIdentity" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"codeBase" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"UserLogConfig" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"DataServiceConfig" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"DataProviderAssemblies" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"DataProviders" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Configuration" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"CommonSettings" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Locator" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"sectionExtension" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"containers" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"container" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"property" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"param" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"property" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"SecurityConfig" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Authenticators" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Authorizers" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"SecurityRepositories" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:parse_supported_runtime sku=L".NETFramework,Version=v4.0" not implemented
    0009:err:mscoree:CLRRuntimeInfo_GetRuntimeHost Wine Mono is not installed
    0009:fixme:msvcrt:__clean_type_info_names_internal (0x1ad4d28) stub
    0009:fixme:vcruntime:__telemetry_main_return_trigger (0x7fe65000000)

    根据我在网上可以找到的关于此问题的信息,我还在R脚本中尝试了以下内容
    xvfb-run -a wine64_anyuser /wineprefix64/drive_c/pwiz/msconvert [...]

    而是得到了这些错误:
    wine: created the configuration directory '/root/.wine'
    0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
    0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
    0014:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
    0014:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
    0014:err:ole:get_local_server_stream Failed: 80004002
    0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
    0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
    0012:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
    0012:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
    0012:err:ole:get_local_server_stream Failed: 80004002

    如果我从 shell 中使用sudo,也会得到类似的错误:
    sudo wine64_anyuser /wineprefix64/drive_c/pwiz/msconvert
    0009:fixme:vcruntime:__telemetry_main_invoke_trigger (0x7fe65000000)
    0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x23e4b0 1 C) semi-stub
    0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x23e520 1 C) semi-stub
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"configSections" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"section" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"dependentAssembly" in state 0
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"assemblyIdentity" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"codeBase" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"UserLogConfig" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"DataServiceConfig" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"DataProviderAssemblies" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"DataProviders" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Configuration" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"CommonSettings" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Locator" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"sectionExtension" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"containers" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"container" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"property" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"param" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"constructor" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"property" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"register" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"lifetime" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"SecurityConfig" in state 2
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Authenticators" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"Authorizers" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"SecurityRepositories" in state 6
    0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"add" in state 6
    0009:fixme:mscoree:parse_supported_runtime sku=L".NETFramework,Version=v4.0" not implemented
    0009:err:mscoree:CLRRuntimeInfo_GetRuntimeHost Wine Mono is not installed
    0009:fixme:msvcrt:__clean_type_info_names_internal (0x1ad4d28) stub
    0009:fixme:vcruntime:__telemetry_main_return_trigger (0x7fe65000000)

    还发布到程序github: https://github.com/ProteoWizard/container/issues/5

    最佳答案

    在原始docker镜像的帮助下找到了一种方法。

    诀窍是在启动cron(link)之前保存环境变量。然后在启动需要它们的过程之前先获取它们。

    因此,docker应该使用以下命令运行脚本:

    #!/bin/bash
    printenv | sed 's/^\([a-zA-Z0-9_]*\)=\(.*\)$/export \1="\2"/g' > $HOME/env.sh

    echo 'Starting cron'
    cron -f

    然后脚本cron启动可能是:
    #!/bin/bash
    [ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -n "$0" "$0" "$@" || :

    # import env that was saved before starting cron
    . $HOME/env.sh

    # Start R script
    /usr/bin/Rscript '/converter_scripts/converter_std.R'

    关于docker - 在Docker中使用Wine进程而不附加到Shell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56753750/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com