1. Dockerfile build file defines parameters
FROM java:8
VOLUME ["/home/pdsstm/uploads/pdsfile"]
COPY pds-stm-management.jar /home/pds-stm/jar/pds-stm-management.jar
ENV CE=$CE
EXPOSE 31080
ENTRYPOINT [ "sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -jar /home/pds-stm/jar/pds-stm-management.jar --spring.profiles.active=$CE" ]
Define variable CE
2. Go to the folder to build the image
docker build -t pds-stm .
3. Run the image with parameters
docker run -d -p 38082:31080 --name pds-stm -e CE="test" -v /home/pds-stm/jar:/home/pds-stm/jar -v /home/pds-stm/logs:/logs --restart=always pds-stm
Read More:
- Constructing docker image of multi arch
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- The deployment of etcd storage and flannel network configuration for kubernetes / k8s multi node deployment
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- Construction of vs2015 OpenGL configuration environment
- Visual studio 2019 + OpenGL environment configuration
- Environment configuration at the beginning of OpenCV + vs2015
- Configure Java environment variables for Ubuntu with Zsh configuration
- JMeter installation and configuration environment variables
- Vs2015 + OpenGL environment configuration
- docker: error pulling image configuration:timeout
- OpenGL environment configuration
- Node configuration environment variable and global installation of webapck
- Centos7 quick installation of docker and configuration of image acceleration
- Vs2015 OpenGL environment configuration
- OpenGL class library and environment configuration under win10 and vs2015
- OpenGL development environment configuration [vs2017] + common problems
- Vscode configuration connection server docker write code
- Clion MinGW super fast configuration OpenGL development environment
- Automatic configuration of springboot and application.yml