Using wine process within docker without attaching to a shell

0

I am trying to run a windows command-line program called msconvert inside a docker container. The authors provide a docker image and it works just fine using ┬┤docker run┬┤ or when connecting to the docker machine and running it from the inside. So this works when connected to a bash shell:

  • wine msconvert
  • wine /wineprefix64/drive_c/pwiz/msconvert
  • wine64_anyuser msconvert (wine64_anyuser was define in the container as sudo -E -u root wine64 "$@"')

What I am trying to do is write a script that uses this windows program periodically using cron. I am running into the problem that it seems wine is not working correctly when there is no interactive session.

The problem arises when I try to have the container run cron and cron launch a script that uses the windows program. Below is what I have.

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 script that runs R script:

#!/bin/bash

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

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

R script:

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)

Errors:

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)



Based on what I could find on the net on this issue I also tried the following in the R script

xvfb-run -a wine64_anyuser /wineprefix64/drive_c/pwiz/msconvert [...]

and instead got these errors:

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



If I use sudo from the shell I also get similar errors:

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)

Also posted to the programs github: https://github.com/ProteoWizard/container/issues/5

docker
docker-compose
dockerfile
wine
asked on Stack Overflow Jun 25, 2019 by Jan Stanstrup

1 Answer

0

Found a way with the help of the original docker image.

The trick is to save the env vars before launching cron (link). Then source them before launching the process that needs them.

So docker should run a script with:

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

echo 'Starting cron'
cron -f

Then the script cron launching could be:

#!/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'
answered on Stack Overflow Jun 26, 2019 by Jan Stanstrup

User contributions licensed under CC BY-SA 3.0