Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
device-docker.yml 1.45 KiB
#
# Docker compose file that launches an interactive iTango session.
#
# Connect to the interactive session with 'docker attach itango'.
# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q>
#
# Defines:
#   - itango: iTango interactive session
#
# Requires:
#   - lofar-device-base.yml
#
version: '2'

services:
  device-docker:
    image: device-docker
    # build explicitly, as docker-compose does not understand a local image
    # being shared among services.
    build:
        context: lofar-device-base
        args:
            SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION}
    container_name: ${CONTAINER_NAME_PREFIX}device-docker
    networks:
      - control
    ports:
      - "5705:5705" # unique port for this DS
    volumes:
      - ..:/opt/lofar/tango:rw
      - /var/run/docker.sock:/var/run/docker.sock:rw # we want to control our sibling containers, NOT do docker-in-docker (dind)
    user: 1000:${DOCKER_GID} # uid 1000 is the default "tango" user
    environment:
      - TANGO_HOST=${TANGO_HOST}
    working_dir: /opt/lofar/tango
    entrypoint:
      - bin/start-ds.sh
      # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA
      # can't know about our Docker port forwarding
      - l2ss-docker-device LTS Docker/1 -v -ORBendPoint giop:tcp:0:5705 -ORBendPointPublish giop:tcp:${HOSTNAME}:5705
    restart: unless-stopped