Hi I am new to docker and docker-compose.
Here is my docker-compose
version: "2.1"
services:
licenseserver:
build:
context: ./licenseserver
dockerfile: .dockerfile
ports:
- "20000:20000"
mac_address: C8-D9-D2-A5-8F-DE
hostname: idol
dockerfile contents
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install unzip
RUN mkdir /opt/MicroFocus
WORKDIR /opt/MicroFocus
ADD LicenseServer.zip /opt/MicroFocus
RUN chmod 777 LicenseServer.zip
RUN unzip LicenseServer.zip
RUN rm -f LicenseServer.zip
WORKDIR /opt/MicroFocus/LicenseServer_12.5.0_LINUX_X86_64
ADD idol.dat /opt/MicroFocus/LicenseServer_12.5.0_LINUX_X86_64
RUN ls -lart
RUN pwd
RUN ./start-licenseserver.sh
docker-compose build works fine, but when I run docker-compose up I get the following. How do I ensure that the container continues to run.
root@development-vm:/home/vinay/docker/AT# docker-compose up
Starting at_licenseserver_1 ... done
Attaching to at_licenseserver_1
at_licenseserver_1 exited with code 0
root@development-vm:/home/vinay/docker/AT# docker-compose exec licenseserver bash
ERROR: No container found for licenseserver_1
The contents of start-licenseserver.sh is as follows
#!/bin/sh
LD_LIBRARY_PATH=./:../bin:./ffmpeg:./filters:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
clear
echo "--------------------------------------------------------------------"
echo "Micro Focus License Server"
echo "(c) 1999-2018 Micro Focus"
echo "--------------------------------------------------------------------"
echo "This script will start License Server"
echo "(licenseserver.exe)"
echo ""
echo "Hit return to continue"
echo "Hit Ctrl-C to end this script now!"
echo "--------------------------------------------------------------------"
read DUMMY
echo "Starting License Server..."
chmod u+x licenseserver.exe
nohup $PWD/licenseserver.exe > licenseserver.out 2> licenseserver.err &
serverpid=$!
echo "Started License Server with PID $serverpid"
exit