aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2019-10-23 15:19:00 +0300
committerRiku Voipio <riku.voipio@linaro.org>2019-10-24 13:18:17 +0300
commitde5b10414406907bd02f5e417eee1af2afb145a2 (patch)
tree0bd273bf1552b0037aff2ac21787a5f666eba9bf
parent53bb640acfca459808d27e606b27572a6f5637ef (diff)
downloaddockerfiles-de5b10414406907bd02f5e417eee1af2afb145a2.tar.gz
Add flexnet container
Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Change-Id: I336f9dd88a17033a0d610fdd346a501553460be1
-rw-r--r--centos8-amd64-flexnet/Dockerfile35
-rw-r--r--centos8-amd64-flexnet/README.md6
-rwxr-xr-xcentos8-amd64-flexnet/build.sh19
-rwxr-xr-xcentos8-amd64-flexnet/entrypoint.sh8
4 files changed, 68 insertions, 0 deletions
diff --git a/centos8-amd64-flexnet/Dockerfile b/centos8-amd64-flexnet/Dockerfile
new file mode 100644
index 0000000..e441395
--- /dev/null
+++ b/centos8-amd64-flexnet/Dockerfile
@@ -0,0 +1,35 @@
+FROM centos:centos8
+
+#########################################
+## ENVIRONMENTAL CONFIG ##
+#########################################
+# add the flexlm commands to $PATH
+ENV PATH="${PATH}:/opt/flexnetserver/"
+
+RUN yum update -y && yum install -y \
+ redhat-lsb-core && \
+ yum clean all
+
+ADD entrypoint.sh /opt/flexnetserver/
+
+# lmadmin is required for -2 -p flag support
+RUN groupadd -r lmadmin && \
+ useradd -r -g lmadmin lmadmin && \
+ chown lmadmin:lmadmin /opt/flexnetserver/
+
+#########################################
+## VOLUMES ##
+#########################################
+VOLUME ["/var/flexnet"]
+
+#########################################
+## EXPOSE PORTS ##
+#########################################
+EXPOSE 2080
+EXPOSE 27000-27009
+
+# do not use ROOT user
+USER lmadmin
+
+ENTRYPOINT ["/opt/flexnetserver/entrypoint.sh"]
+# no CMD, use container as if 'lmgrd'
diff --git a/centos8-amd64-flexnet/README.md b/centos8-amd64-flexnet/README.md
new file mode 100644
index 0000000..460eb24
--- /dev/null
+++ b/centos8-amd64-flexnet/README.md
@@ -0,0 +1,6 @@
+docker run -d --mac-address="[LICENSE_MAC_ADDRESS]" \
+-h [LICENSE_HOSTNAME] \
+-v /var/flexnet:/var/flexnet:ro \
+-p 2080:2080 -p 27000-27009:27000-27009 \
+trustedfirmware/flexnet
+-c /var/flexnet/server.lic
diff --git a/centos8-amd64-flexnet/build.sh b/centos8-amd64-flexnet/build.sh
new file mode 100755
index 0000000..f028483
--- /dev/null
+++ b/centos8-amd64-flexnet/build.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+trap cleanup_exit INT TERM EXIT
+
+cleanup_exit()
+{
+ rm -f *.list *.key
+}
+
+export LANG=C
+
+DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
+ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
+
+image=trustedfirmware/flexnet
+docker build --pull --tag=$image .
+echo $image > .docker-tag
diff --git a/centos8-amd64-flexnet/entrypoint.sh b/centos8-amd64-flexnet/entrypoint.sh
new file mode 100755
index 0000000..e6fc588
--- /dev/null
+++ b/centos8-amd64-flexnet/entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+export PATH=$PATH:/opt/flexnetserver/
+cd /opt/flexnetserver/ && tar zxvf /var/flexnet/*.tgz
+
+lmutil lmhostid
+lmgrd -z $@
+