MATLAB docker-compose.yml configuration
I’m trying to dockerize MATLAB with other services (React JS, Python Django, and Postgres database – these other services have been successfully dockerized and integrated).
When I run docker-compose up, it hangs on building the matlab image. I followed steps 1-4 (for step 2, I used the MATLAB Linux ISO image for MATLAB R2020b) for the Dockerfile for MATLAB: https://github.com/mathworks-ref-arch/matlab-dockerfile#optional-dependencies
I did not build the docker image (step 5) though as I need it to be built along with my other services. I noticed step 5 though requiresa a few parameters:
docker build -t matlab:r2020a –build-arg LICENSE_SERVER=27000@MyServerName .
What should the license server parameters be and how should I include them in the docker-compose.yml if necessary?
I copied the whole repository matlab-dockerfile afterwards to ./back-end/server_side/send_values/api/matlab/ (relative path on my MacOS system). The Dockerfile is in ./back-end/server_side/send_values/api/matlab/ and is the same Dockerfile at https://github.com/mathworks-ref-arch/matlab-dockerfile#optional-dependencies
How should I update the docker-compose.yml file to correctly build the MATLAB image?
docker-compose.yml
version: "3.9"
services:
db:
image: postgres
environment:
– POSTGRES_DB=postgres
– POSTGRES_USER=postgres
– POSTGRES_PASSWORD=postgres
matlab:
build: ./back-end/server_side/send_values/api/matlab/matlab-dockerfile
backend:
build: ./back-end
command: python server_side/manage.py runserver 0.0.0.0:8000
volumes:
– ./back-end:/code
environment:
– SECRET_KEY=${SECRET_KEY:?err}
– DEBUG=${DEBUG}
– DB_NAME=${DB_NAME}
– DB_USER=${DB_USER}
– DB_PASSWORD=${DB_PASSWORD}
– DB_HOST=${DB_HOST}
– DB_PORT=${DB_PORT}
ports:
– "8000:8000"
depends_on:
– db
– matlab
frontend:
build: ./react-ui
command: npm start
volumes:
– ./react-ui:/app
# Don’t want to use local node modules
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
– /app/node_modules/
ports:
– "3000:3000"
depends_on:
– backendI’m trying to dockerize MATLAB with other services (React JS, Python Django, and Postgres database – these other services have been successfully dockerized and integrated).
When I run docker-compose up, it hangs on building the matlab image. I followed steps 1-4 (for step 2, I used the MATLAB Linux ISO image for MATLAB R2020b) for the Dockerfile for MATLAB: https://github.com/mathworks-ref-arch/matlab-dockerfile#optional-dependencies
I did not build the docker image (step 5) though as I need it to be built along with my other services. I noticed step 5 though requiresa a few parameters:
docker build -t matlab:r2020a –build-arg LICENSE_SERVER=27000@MyServerName .
What should the license server parameters be and how should I include them in the docker-compose.yml if necessary?
I copied the whole repository matlab-dockerfile afterwards to ./back-end/server_side/send_values/api/matlab/ (relative path on my MacOS system). The Dockerfile is in ./back-end/server_side/send_values/api/matlab/ and is the same Dockerfile at https://github.com/mathworks-ref-arch/matlab-dockerfile#optional-dependencies
How should I update the docker-compose.yml file to correctly build the MATLAB image?
docker-compose.yml
version: "3.9"
services:
db:
image: postgres
environment:
– POSTGRES_DB=postgres
– POSTGRES_USER=postgres
– POSTGRES_PASSWORD=postgres
matlab:
build: ./back-end/server_side/send_values/api/matlab/matlab-dockerfile
backend:
build: ./back-end
command: python server_side/manage.py runserver 0.0.0.0:8000
volumes:
– ./back-end:/code
environment:
– SECRET_KEY=${SECRET_KEY:?err}
– DEBUG=${DEBUG}
– DB_NAME=${DB_NAME}
– DB_USER=${DB_USER}
– DB_PASSWORD=${DB_PASSWORD}
– DB_HOST=${DB_HOST}
– DB_PORT=${DB_PORT}
ports:
– "8000:8000"
depends_on:
– db
– matlab
frontend:
build: ./react-ui
command: npm start
volumes:
– ./react-ui:/app
# Don’t want to use local node modules
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
– /app/node_modules/
ports:
– "3000:3000"
depends_on:
– backend I’m trying to dockerize MATLAB with other services (React JS, Python Django, and Postgres database – these other services have been successfully dockerized and integrated).
When I run docker-compose up, it hangs on building the matlab image. I followed steps 1-4 (for step 2, I used the MATLAB Linux ISO image for MATLAB R2020b) for the Dockerfile for MATLAB: https://github.com/mathworks-ref-arch/matlab-dockerfile#optional-dependencies
I did not build the docker image (step 5) though as I need it to be built along with my other services. I noticed step 5 though requiresa a few parameters:
docker build -t matlab:r2020a –build-arg LICENSE_SERVER=27000@MyServerName .
What should the license server parameters be and how should I include them in the docker-compose.yml if necessary?
I copied the whole repository matlab-dockerfile afterwards to ./back-end/server_side/send_values/api/matlab/ (relative path on my MacOS system). The Dockerfile is in ./back-end/server_side/send_values/api/matlab/ and is the same Dockerfile at https://github.com/mathworks-ref-arch/matlab-dockerfile#optional-dependencies
How should I update the docker-compose.yml file to correctly build the MATLAB image?
docker-compose.yml
version: "3.9"
services:
db:
image: postgres
environment:
– POSTGRES_DB=postgres
– POSTGRES_USER=postgres
– POSTGRES_PASSWORD=postgres
matlab:
build: ./back-end/server_side/send_values/api/matlab/matlab-dockerfile
backend:
build: ./back-end
command: python server_side/manage.py runserver 0.0.0.0:8000
volumes:
– ./back-end:/code
environment:
– SECRET_KEY=${SECRET_KEY:?err}
– DEBUG=${DEBUG}
– DB_NAME=${DB_NAME}
– DB_USER=${DB_USER}
– DB_PASSWORD=${DB_PASSWORD}
– DB_HOST=${DB_HOST}
– DB_PORT=${DB_PORT}
ports:
– "8000:8000"
depends_on:
– db
– matlab
frontend:
build: ./react-ui
command: npm start
volumes:
– ./react-ui:/app
# Don’t want to use local node modules
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
– /app/node_modules/
ports:
– "3000:3000"
depends_on:
– backend docker MATLAB Answers — New Questions