This repository has been archived by the owner on Feb 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
54 lines (40 loc) · 1.76 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:16.04
MAINTAINER <dave.cowden@gmail.com>
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV CQ_HOME=/opt/cadquery
#from continuum: https://hub.docker.com/r/continuumio/anaconda/~/dockerfile/
RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 \
git mercurial subversion
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh
RUN apt-get install -y curl grep sed dpkg && \
TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \
curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \
dpkg -i tini.deb && \
rm tini.deb && \
apt-get clean
ENV PATH /opt/conda/bin:$PATH
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:freecad-maintainers/freecad-stable && \
apt-get update && apt-get install -y freecad
RUN mkdir -p $CQ_HOME
RUN mkdir -p $CQ_HOME/build_data
VOLUME $CQ_HOME/build_data
COPY requirements-dev.txt runtests.py cq_cmd.py cq_cmd.sh setup.py README.rst MANIFEST setup.cfg $CQ_HOME/
COPY cadquery $CQ_HOME/cadquery
COPY examples $CQ_HOME/examples
COPY tests $CQ_HOME/tests
RUN pip install -r /opt/cadquery/requirements-dev.txt
RUN cd $CQ_HOME && python ./setup.py install
RUN pip install cqparts
RUN pip install cqparts-bearings
RUN pip install cqparts-fasteners
RUN pip install cqparts-misc
RUN chmod +x $CQ_HOME/cq_cmd.sh
RUN useradd -ms /bin/bash cq
USER cq
WORKDIR /home/cq
ENTRYPOINT [ "/opt/cadquery/cq_cmd.sh" ]