Browse Source

Make executable files to be able to run by non root and non thingsboa… (#2698)

* Make executable files to be able to run by non root and non thingsboard user (to be in sync with OpenShift policies)

* Added default yes to agreement
pull/2700/head
VoBa 6 years ago
committed by GitHub
parent
commit
0cae071e5a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      msa/js-executor/docker/Dockerfile
  2. 4
      msa/tb-node/docker/Dockerfile
  3. 4
      msa/transport/coap/docker/Dockerfile
  4. 4
      msa/transport/http/docker/Dockerfile
  5. 4
      msa/transport/mqtt/docker/Dockerfile
  6. 4
      msa/web-ui/docker/Dockerfile

4
msa/js-executor/docker/Dockerfile

@ -21,10 +21,12 @@ COPY start-js-executor.sh ${pkg.name}.deb /tmp/
RUN chmod a+x /tmp/*.sh \
&& mv /tmp/start-js-executor.sh /usr/bin
RUN dpkg -i /tmp/${pkg.name}.deb
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}
USER ${pkg.user}
CMD ["start-js-executor.sh"]

4
msa/tb-node/docker/Dockerfile

@ -21,12 +21,14 @@ COPY start-tb-node.sh ${pkg.name}.deb /tmp/
RUN chmod a+x /tmp/*.sh \
&& mv /tmp/start-tb-node.sh /usr/bin
RUN dpkg -i /tmp/${pkg.name}.deb
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
RUN chown -R ${pkg.user}:${pkg.user} /tmp
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar
USER ${pkg.user}
CMD ["start-tb-node.sh"]

4
msa/transport/coap/docker/Dockerfile

@ -21,10 +21,12 @@ COPY start-tb-coap-transport.sh ${pkg.name}.deb /tmp/
RUN chmod a+x /tmp/*.sh \
&& mv /tmp/start-tb-coap-transport.sh /usr/bin
RUN dpkg -i /tmp/${pkg.name}.deb
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar
USER ${pkg.user}
CMD ["start-tb-coap-transport.sh"]

4
msa/transport/http/docker/Dockerfile

@ -21,10 +21,12 @@ COPY start-tb-http-transport.sh ${pkg.name}.deb /tmp/
RUN chmod a+x /tmp/*.sh \
&& mv /tmp/start-tb-http-transport.sh /usr/bin
RUN dpkg -i /tmp/${pkg.name}.deb
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar
USER ${pkg.user}
CMD ["start-tb-http-transport.sh"]

4
msa/transport/mqtt/docker/Dockerfile

@ -21,10 +21,12 @@ COPY start-tb-mqtt-transport.sh ${pkg.name}.deb /tmp/
RUN chmod a+x /tmp/*.sh \
&& mv /tmp/start-tb-mqtt-transport.sh /usr/bin
RUN dpkg -i /tmp/${pkg.name}.deb
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar
USER ${pkg.user}
CMD ["start-tb-mqtt-transport.sh"]

4
msa/web-ui/docker/Dockerfile

@ -21,10 +21,12 @@ COPY start-web-ui.sh ${pkg.name}.deb /tmp/
RUN chmod a+x /tmp/*.sh \
&& mv /tmp/start-web-ui.sh /usr/bin
RUN dpkg -i /tmp/${pkg.name}.deb
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}
USER ${pkg.user}
CMD ["start-web-ui.sh"]

Loading…
Cancel
Save