CADViewer Docker Image
The CADViewer Docker image contains an Ubuntu 20.04 LTS server with Apache and PHP, running CADViewer front-end, back-end conversion scripts and CAD converters for PHP.
Pull request
docker pull cadviewer/cadviewer-full-server
Documentation
Simply from the image access the samples in: myurl:myport/cadviewer/html, server location is: /var/www/html/cadviewer/html/ the code in these templates can directly be used as template to program externally to pull the CADViewer interface and trigger CAD Conversions from the image.
All documentation follows the standard CADViewer installation with PHP scripts, see:
|
|
Docker Hub link
https://hub.docker.com/r/cadviewer/cadviewer-full-server
Docker file
For developers wanting to add CADViewer and our back-end converters into a custom image, our Dockerfile is as follows:
FROM ubuntu:20.04
MAINTAINER support@cadviewer.com
ENV TZ=Europe/Stockholm
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y apache2
RUN apt-get install -y php libapache2-mod-php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
RUN mkdir -p /var/lock/apache2
RUN mkdir -p /var/run/apache2
RUN apt-get install -y git
RUN apt-get install -y subversion
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_LOG_DIR /var/log/apache2
ENV LANG C
CMD ["/usr/sbin/apache2","-D","FOREGROUND"]
EXPOSE 80
COPY cad.conf /etc/httpd/conf.d/
WORKDIR /var/www/html
RUN svn checkout https://github.com/CADViewer/cadviewer-script-library-php-linux/trunk/cadviewer/
WORKDIR /var/www/html/cadviewer/php/
RUN chmod -R 755 /var/www/html/cadviewer/php/
RUN chmod -R 777 /var/www/html/cadviewer/converters/