Python environment developed on windows incompatible when building linux container

I received this error with I tried to build my docker container

  - vc==14.1=h21ff451_3
  - vs2015_runtime==15.5.2=3
  - wincertstore==0.2=py36h7fe50ca_0
  - sqlite==3.30.1=hfa6e2cd_0
  - python==3.6.9=h5500b2f_0
  - markupsafe==1.1.1=py36he774522_0

And my conda environment yml file looks like this

name: spacy_2_2_3
  - anaconda
  - conda-forge
  - defaults
  - certifi=2019.11.28=py36_0
  - click=7.0=py36_0
  - flask=1.1.1=py_0
  - itsdangerous=1.1.0=py36_0
  - jinja2=2.10.3=py_0
  - markupsafe=1.1.1=py36he774522_0
  - pip=19.3.1=py36_0
  - python=3.6.9=h5500b2f_0
  - setuptools=44.0.0=py36_0
  - sqlite=3.30.1=hfa6e2cd_0
  - vc=14.1=h21ff451_3
  - vs2015_runtime=15.5.2=3
  - werkzeug=0.16.0=py_0
  - wheel=0.33.6=py36_0
  - wincertstore=0.2=py36h7fe50ca_0
  - pip:
    - altgraph==0.16.1
    - blis==0.4.1
    - catalogue==0.2.0
    - chardet==3.0.4
    - cymem==2.0.3
    - future==0.18.2
    - idna==2.8
    - importlib-metadata==1.3.0
    - more-itertools==8.0.2
    - murmurhash==1.0.2
    - numpy==1.18.1
    - pefile==2019.4.18
    - plac==1.1.3
    - preshed==3.0.2
    - pyinstaller==3.5
    - pywin32-ctypes==0.2.0
    - requests==2.22.0
    - spacy==2.2.3
    - srsly==1.0.1
    - thinc==7.3.1
    - tqdm==4.41.1
    - urllib3==1.25.7
    - wasabi==0.6.0
    - zipp==0.6.0
prefix: D:\Anaconda\envs\spacy_2_2_3

Dockerfile looks like

FROM continuumio/miniconda3
COPY . /api
RUN apt-get update 
RUN conda update -n base conda -y && conda env update
RUN pip install gunicorn

We do all of you development on Windows 10 machines. I was thinking this might be a compatibility issue, that there are packages that installed specific dependencies for Windows to the environment and that are not available on Linux? Is this a possibility?

EDIT: Yes this is true, I copied the yml file to a Linux virtual machine and tried to create a new conda environment from it and it failed with the same error.

My question is what Is the recommended approach here when doing all your development on windows yet want to make use of Linux containers?

Should we switch to Windows Containers?

what Is the recommended approach here when doing all your development on windows yet want to make use of Linux containers?

I’m not sure most languages and frameworks actually have this problem. Certainly working in nodeJS and .NET Core you can develop on windows easily enough and run your code in a linux container pretty easily.

Basically this isn’t a docker issue its a conda issue, see various results with people having the same problems, there are some suggested workarounds but they are all conda specific:

I don’t know much about conda so i can’t advise about using windows containers for your specific case, but it might work better. Windows containers are generally not used much and limit your choice of host, run a bit slower, are generally bigger etc, but these downsides may not affect you.