Использование процесса виноделия в докере без прикрепления к оболочке - PullRequest
0 голосов
/ 25 июня 2019

Я пытаюсь запустить программу командной строки Windows под названием msconvert в контейнере Docker.Авторы предоставляют образ докера, и он прекрасно работает с помощью «запуска докера» или при подключении к докеру и запуске его изнутри.Так что это работает при подключении к оболочке bash:

  • wine msconvert
  • wine / wineprefix64 / drive_c / pwiz / msconvert
  • wine64_anyuser msconvert (wine64_anyuser было определено вконтейнер как sudo -E -u root wine64 "$@"')

Я пытаюсь написать скрипт, который периодически использует эту программу для Windows с использованием cron.Я сталкиваюсь с проблемой, что кажется, что Wine не работает правильно, когда нет интерактивного сеанса.

Проблема возникает, когда я пытаюсь заставить контейнер запустить 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-compose:

  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'

Bash-скрипт, запускающий Rскрипт:

#!/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



Если я использую 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

1 Ответ

0 голосов
/ 26 июня 2019

Нашел способ с помощью оригинального образа докера.

Хитрость заключается в том, чтобы сохранить переменные env перед запуском cron ( link ). Затем отправьте их перед запуском нужного процесса.

Таким образом, докер должен запустить скрипт с:

#!/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'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...