Skip to content

fix(docker): Update air gap installation configuration #1650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imfeniljikadara
Copy link

Closes #1579

This PR addresses issues with the air gap installation configuration, ensuring proper image names, unified command formats, and inclusion of the ClamAV service.

Changes

  • Fixed image names in docker-compose-offline.yml:
    • Changed scancodeio_web to scancodeio-web
    • Changed scancodeio_worker to scancodeio-worker
image: scancodeio-web
    networks:
      default: null
    volumes:
      - type: bind
        source: /etc/scancodeio/
        target: /etc/scancodeio
        bind:
          create_host_path: true
      - type: volume
        source: workspace
        target: /var/scancodeio/workspace
        volume: {}
      - type: volume
        source: static
        target: /var/scancodeio/static
        volume: {}
image: scancodeio-worker
    networks:
      default: null
    volumes:
      - type: bind
        source: /etc/scancodeio/
        target: /etc/scancodeio
        bind:
          create_host_path: true
      - type: volume
        source: workspace
        target: /var/scancodeio/workspace
        volume: {}
  • Unified worker command format:
    • Standardized command structure between docker-compose.yml and docker-compose-offline.yml
    • Updated verbosity level from 2 to 1
 command: wait-for-it --strict --timeout=120 web:8000 -- sh -c "
    ./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker
                         --queue-class scancodeio.worker.ScanCodeIOQueue
                         --verbosity 1"
  • Added ClamAV service and configuration:
    • Added ClamAV service to docker-compose-offline.yml
    • Added corresponding volume configuration
    • Updated Makefile to include ClamAV in docker-images target
clamav:
    image: clamav/clamav
    networks:
      default: null
    restart: always
    volumes:
      - type: volume
        source: clamav_data
        target: /var/lib/clamav
        volume: {}
      - type: volume
        source: workspace
        target: /var/scancodeio/workspace
        volume: {}
  • Updated documentation:
    • Added note about ClamAV image in offline package
@docker save postgres redis scancodeio-worker scancodeio-web nginx clamav/clamav | gzip > build/scancodeio-images.tar.gz

Validation

  • Confirmed configuration validity using docker compose config
  • Verified that both configurations match except for expected differences (image vs. build)
  • Compared configurations using vimdiff as suggested in the issue

Notes

  • Unable to fully test build process due to architecture compatibility issues on ARM-based Mac
  • All configuration changes have been validated for syntax correctness

Related Issues

…nd add clamav service

Signed-off-by: Fenil Jikadara <feniljikadara2004@gmail.com>
@imfeniljikadara imfeniljikadara force-pushed the fix-airgap-installation branch from 40d5ad6 to 861db36 Compare April 5, 2025 07:32
@imfeniljikadara imfeniljikadara marked this pull request as ready for review April 5, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Air gap installation requires update (docker compose)
1 participant