Sign inSign up

michaelirwin244/labspace-content-dev:v0.3.1

Manifest digest

sha256:7d4e547f530e8117385776c8bef1755b579288d7524cb4408ad3c280a13a72c8

Last pushed

about 1 year by michaelirwin244

Type

Compose

Manifest digest

sha256:7d4e547f530e8117385776c8bef1755b579288d7524cb4408ad3c280a13a72c8

Compose file content

##################################################################################################
# This Compose file is intended to be used in the development of Labspace content.
#
# Set $CONTENT_PATH to point to the path of your Labspace content (e.g. ./content)
##################################################################################################

services:
  configurator:
    image: michaelirwin244/labspace-configurator:v0.3.1
    volumes:
      - content:/project
      - support-vscode-extension:/etc/support-extension
    environment:
      DEV_MODE: true

  interface:
    image: michaelirwin244/labspace-interface:v0.3.1
    ports:
      - "3030:3030"
    volumes:
      - ${CONTENT_PATH}:/project
      - type: volume
        source: support-vscode-extension
        target: /etc/cmd-executor/private-key
        volume:
          subpath: private-key
      - type: volume
        source: support-vscode-extension
        target: /etc/cmd-executor/socket
        volume:
          subpath: socket
    environment:
      CONTENT_DEV_MODE: true
    depends_on:
      workspace:
        condition: service_started
      configurator:
        condition: service_completed_successfully
    restart: unless-stopped

  workspace:
    image: michaelirwin244/labspace-workspace:v0.3.1
    depends_on:
      configurator:
        condition: service_completed_successfully
      socket-proxy:
        condition: service_started
    ports:
      - 8085:8085 # For the IDE itself
      - 3000:3000 # For the Node application running in the IDE
    volumes:
      - socket-proxy:/var/run
      - ${CONTENT_PATH}:/home/coder/project
      - type: volume
        source: support-vscode-extension
        target: /etc/cmd-executor/public-key
        volume:
          subpath: public-key
      - type: volume
        source: support-vscode-extension
        target: /etc/cmd-executor/socket
        volume:
          subpath: socket


  host-republisher:
    image: michaelirwin244/labspace-host-port-republisher:v0.3.1
    volumes:
      - socket-proxy:/var/run
    network_mode: service:workspace
    environment:
      LABEL_FILTER: labspace-resource=true
    depends_on:
      - workspace
      - socket-proxy

  workspace-cleaner:
    image: michaelirwin244/labspace-cleaner:v0.3.1
    volumes:
      - socket-proxy:/var/run
    environment:
      LABEL_FILTER: labspace-resource=true
    depends_on:
      - socket-proxy

  socket-proxy:
    image: mikesir87/docker-socket-proxy:v1.0.0
    volumes:
      - socket-proxy:/tmp/proxy
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      DEBUG_LOGS: "true"
      CONFIG_DATA: |
        mutators:
          # Remap the project directory to the labspace content volume, since the project
          # is running out of a volume.
          - type: mountPath
            from: /home/coder/project
            to: ${CONTENT_PATH}

          # If requests to use the Docker Socket are used (such as Testcontainers),
          # use the proxied one to ensure permissions, remappings, etc. are applied
          - type: mountPath
            from: /var/run/docker.sock
            to: labspace-socket-proxy/docker.sock

          # Add labels to all newly created objects
          - type: addLabels
            labels:
              labspace-resource: "true"

          - type: addToNetwork
            networks:
              - labspace
        # gates:
        #   - type: mountSource
        #     allowedSources:
        #       - labspace-content
        #       - labspace-socket-proxy
        #       - buildx_buildkit_default_state
        #       - ${CONTENT_PATH}

        responseFilters:
          # Only return objects with the labels we mutated on
          - type: labelFilter
            requiredLabels:
              labspace-resource: "true"
      LISTEN_SOCKET_PATH: /tmp/proxy/docker.sock

volumes:
  socket-proxy:
    name: labspace-socket-proxy
  content:
    name: labspace-content
  support-vscode-extension:

networks:
  default:
    name: labspace

Docker commands

docker compose -f oci://michaelirwin244/labspace-content-dev:v0.3.1 up

Use the above command to pull and run the Compose file. Learn more.

Images used

Image


Pulls

10K+

Stars

0

Last Updated

8 months

Image


Pulls

1.5K

Stars

0

Last Updated

9 months

Image


Pulls

1.5K

Stars

0

Last Updated

5 months

Image


Pulls

1.2K

Stars

0

Last Updated

about 1 year

Image


Pulls

1.2K

Stars

0

Last Updated

9 months

Image


Pulls

1.0K

Stars

0

Last Updated

9 months