Vectorworks, Inc Employee JoshP Posted March 17, 2021 Vectorworks, Inc Employee Share Posted March 17, 2021 Setting up and Understanding Project Sharing - Docker What is Docker? When it comes to understanding docker, think of a shipping container, and it's cargo. The shipping container represents your main operating system (The host), and the cargo are containers (operating systems within the host) This means you can have a number of different operating systems running within another operating system, and the two can communicate using specified means set by docker but are otherwise oblivious to one another. An example of this is you can have Windows 10 running as a Docker Host and have an Ubuntu Linux system running as a container. However will not need to worry to much about the inner workings of what docker is and how it works. So let's jump into setting up Project Sharing With your installer media you will have a zip file for the project sharing server. Within that zip you will find installation instructions. The point of this post is to expand on those instructions. In order to follow these instructions you will: Have access to the host you plan on deploying this software to (should be an always on machine) Have Docker installed and running Have some working knowledge of a command line, however nothing in here should be difficult to grasp The Project Sharing Server Setup Make sure you are connected to the host and have the project-sharing-server.tar copied to your host Loading our Docker Image: docker load -i ./project-sharing-server.tar Breaking this down we are telling `docker` to `load` the `-i` input of `./project-sharing-server.tar` file Confirm load is successful: docker image ls -a You should now se something like: REPOSITORY TAG IMAGE ID CREATED SIZE project-sharing-server latest 657e01b1dc11 2 months ago 85.2MB Running our container: I will be running you through two variants of this command, one will be the command line and the other will be using a helpful tool called docker compose. However in order to get up and running, only one method is required. Via Command Line: docker run -d --env L=1 --name ps-server -v /your/local/storage/location:/usr/psserverd/Projects -v /you/local/storage/for/logs:/usr/psserverd/log -p 22001:22001 project-sharing-server:latest Let's reformat this into something easier to understand docker run -d --env L=1 --name ps-server -v /your/local/storage/location:/usr/psserverd/Projects -v /you/local/storage/for/logs:/usr/psserverd/log -p 22001:22001 project-sharing-server:latest From the top down here is what we are doing: We are telling `docker` to `run` a new container that is `-d` detached from our command window with the `env l=1` environment variable L equaling 1 for dockers logging of the container Then we tell our container that we are attaching two volumes to our host noted by the `-v` followed by the location of the folder on the host FS then a colon to tell docker everything after that is the file system within our container an example of this could be -v C:\Storage\Projects:/usr/psserverd/Projects So here we are storing all the files and folder that get created in /usr/psserverd/Projects on our C drive in Storage\Projects The /usr/psserverd/Projects directory is the directory that usually contains your existing PFs, VWX, PDFs, PNGs, etc. Next in order to connect to our new server we need to expose it to the outside world using the ports signified by the -p. Now when we want to use this we connect to our host on port 22001 and it will pass the traffic to our container Like our volumes, we have two parts, our host port and our container port. Where the container port cannot change, we can change the host port. so wee could say if we want to connect to our server on port 21035 we would type -p 21035:22001 then any time you want to connect to the project sharing server you would use your host IP with the port 21035 Last up in the image we are using, this is the image we loaded previously and all we do here is call it to be loaded Via Docker Compose: This is the method I personally prefer as it will mean that all your settings are saved to a file so you don't have to remember everything This method uses a file called docker-compose.yaml, this will be a new blank file in your host that you will fill out with all the right information A special note, the use of the YAML format means that spacing has meaning, so be sure to use the same spacing everywhere, I personally just press tab as you will see. #docker-compose.yaml version: "3.9" services: ps-server: image: project-sharing-server:latest container_name: ps-server ports: - 22001:22001 environment: l: 1 volumes: - /path/to/host/project/storage:/usr/psserverd/Projects - /path/to/host/log/storage:/usr/psserverd/log Now all we need to do is in the same directory as this new docker-compose.yaml file we type in docker-compose up After you have your container up and running you can check the status of it by running docker container ls -a Please note that these are not official instructions and is intended as a jumping off point with the most basic setup. There's a vast amount of tutorials and documentation surrounding docker and how it operates. 2 Quote Link to comment
matteoluigi Posted February 6, 2023 Share Posted February 6, 2023 @JoshP now I tried to run ps server on a raspberry pi however it doesn't work, in portainer there's written, that the docker image doesn't run... 😉 it's a raspberry pi 3 Quote PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" ~ Quote Link to comment
Vectorworks, Inc Employee JoshP Posted February 8, 2023 Author Vectorworks, Inc Employee Share Posted February 8, 2023 @matteoluigi In order to help narrow down the issue, I think it's a good idea connect directly to the machine and run the docker command manually as I mentioned above, just to see if it will work. If it works then there is likely a configuration issue with portainer. A side note, I have not tried running project sharing myself on a Rpi, but I would imagine you will end up with far less than an optimal experience. Quote Link to comment
matteoluigi Posted February 8, 2023 Share Posted February 8, 2023 (edited) I'm not sure if it will work... I'm afraid, the docker image doesn't run on an ARM machine. For all, that's just a test now. Maybe a Raspby 4 with 8GB of Ram could be a little bit more performant for that issue 😉 i tried Quote docker run -d --env L=1 --name ps-server -v /your/local/storage/location:/usr/psserverd/Projects -v /you/local/storage/for/logs:/usr/psserverd/log -p 22001:22001 project-sharing-server:latest and got the following error message: Quote WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested c858c247419c43bb64abf944abf428f8a713298e52ebea520b4f40c75026a81c Tolu already told me: Quote Our docker image only supports linux/amd64 as the message indicates. We are using a Debian:buster-slim. Edited February 8, 2023 by matteoluigi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.