-
Get Docker
-
Create a folder called build
-
Copy Dockerfile to the folder build
-
build:
docker build -t test_xml .
-
test:
docker run -it --rm test_xml
Created
February 2, 2017 15:47
-
-
Save lukecampbell/f41966583668c800dd4cafd1ffd68600 to your computer and use it in GitHub Desktop.
Docker container demonstrating lxml bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM phusion/baseimage:0.9.18 | |
MAINTAINER Luke Campbell <[email protected]> | |
# General dependencies: | |
RUN apt-get update && \ | |
apt-get install -y wget git build-essential libxml2 libicu52 | |
# Install nodejs/npm and friends: | |
RUN (curl -sL https://deb.nodesource.com/setup_6.x | bash) && \ | |
apt-get update && \ | |
apt-get install -y nodejs && \ | |
npm install -g grunt-cli && \ | |
rm -rf /var/lib/apt/lists/* | |
# Install conda/python | |
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \ | |
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-4.0.5-Linux-x86_64.sh -O ~/miniconda.sh && \ | |
/bin/bash ~/miniconda.sh -b -p /opt/conda && \ | |
rm ~/miniconda.sh && \ | |
export PATH="/opt/conda/bin:${PATH}" && \ | |
conda config --set always_yes yes --set changeps1 no && \ | |
conda config --set show_channel_urls True && \ | |
conda config --add create_default_packages pip && \ | |
echo 'conda 4.0.*' >> /opt/conda/conda-meta/pinned && \ | |
conda update conda && \ | |
conda config --add channels conda-forge && \ | |
conda clean --all --yes | |
ENV PATH=/opt/conda/bin:$PATH | |
RUN conda install lxml | |
RUN echo "from lxml import etree as ET" > /test_xml.py | |
CMD ["/opt/conda/bin/python", "/test_xml.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment