[docker-compose] Cannot build the UI

191 views
Skip to first unread message

jean-christophe manciot

unread,
Jun 27, 2023, 9:16:02 AM6/27/23
to AWX Project
Environment:

- Ubuntu 20.04 focal LTS
- docker-ce: 5:24.0.2-1~ubuntu.20.04~focal (deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable)
- docker-compose-plugin: 2.18.1-1~ubuntu.20.04~focal (deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable)
- python3.9: 3.9.5-3ubuntu0~20.04.1
- ansible 8.0.0 (from Pypi)
- setuptools-scm: 7.1.0  (from Pypi)

Workflow:

        su - awx
        git clone https://github.com/ansible/awx.git
        cd awx
        git switch -c release_4.4
        . /opt/awx/venv/bin/activate
        make docker-compose-build

        make docker-compose &
        docker exec tools_awx_1 make clean-ui ui-devel

leads to:

        rm -rf node_modules
        rm -rf awx/ui/node_modules
        rm -rf awx/ui/build
        rm -rf awx/ui/src/locales/_build
        rm -rf awx/ui/.ui-built
        mkdir -p awx/ui/build/static
        NODE_OPTIONS=--max-old-space-size=6144 npm --prefix awx/ui --loglevel warn --force ci
        npm WARN using --force Recommended protections disabled.
        npm ERR! code ERR_SOCKET_TIMEOUT
        npm ERR! errno ERR_SOCKET_TIMEOUT
        npm ERR! network request to https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz failed, reason: Socket timeout
        npm ERR! network This is a problem related to network connectivity.
        npm ERR! network In most cases you are behind a proxy or have bad network settings.
        npm ERR! network
        npm ERR! network If you are behind a proxy, please make sure that the
        npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

        npm ERR! A complete log of this run can be found in:
        npm ERR!     /var/lib/awx/.npm/_logs/2023-06-27T12_39_03_228Z-debug-0.log
        make: *** [Makefile:429: awx/ui/node_modules] Error 1

This means that the container cannot access registry.npmjs.org, which is strange because that URL is accessible from outside the container:

        (venv) awx@sdx1-kvm:~/git-awx$ curl --connect-timeout 120 --http2 --location --retry 3 --show-error --output yocto-queue-0.1.0.tgz --url https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz
          % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                         Dload  Upload   Total   Spent    Left  Speed
        100  2765  100  2765    0     0  57604      0 --:--:-- --:--:-- --:--:-- 58829

Any suggestion about the potential reason(s) why the container cannot access the outside world?
  1. make docker-compose-build.log
  2. make docker-compose.log
make docker-compose-build.log
make docker-compose.log
Reply all
Reply to author
Forward
0 new messages