Content
- Installing from the repository
- Installing from source
Working with Linux ( TangoBox 9.3 based on Ubuntu 18.04) will be described here .
Installing from the repository
We get the latest version of docker from the repository and run it.
docker pull tangocs/rest-server:rest-server-2.1 docker run --restart unless-stopped -p 8080:8080 -d tangocs/rest-server:rest-server-2.1
We look at the result of the execution. Tangocs / rest-server has been added to the list of containers .
Tangocs / rest-server: rest-server-2.1 has been added to the list of running containers .
Functional check:
, TangoBox 9.3 RestServer. docker-, !
:
10001 , , Tango Controls localhost, docker.
http://localhost:10001/tango/rest/rc4/hosts/localhost/10000/devices/sys/tg_test/1/attributes/double_scalar/value
API .
docker 8080 , . Tango Controls ip 172.17.0.1 !
http://localhost:8080/tango/rest/v10/hosts/172.17.0.1;port=10000/devices/sys/tg_test/1/attributes/double_scalar/value
. , 2.2.
git clone https://github.com/tango-controls/rest-server.git
cd rest-server
docker java 11, 8- .
8 11.
sudo update-alternatives --config java
mvn package docker build -t tangocs/rest-server:rest-server-2.2 .
:
COPY failed: file not found in build context or excluded by .dockerignore: stat target/.war: file does not exist
Dockerfile
COPY target/${REST_SERVER_VERSION}.war /usr/local/tomcat/webapps/tango.war
COPY target/rest-server-2.2-SNAPSHOT.war /usr/local/tomcat/webapps/tango.war
.. docker rest-server-2.2-SNAPSHOT.war
:
docker, 8080 .
docker run --restart unless-stopped -p 8080:8080 -d tangocs/rest-server:rest-server-2.2
1- .
Let's switch the java version back to 8th.
sudo update-alternatives --config java
Thanks for attention.