IBM QRadar

IBM QRadar

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Qapp build error

    Posted Tue August 15, 2023 11:44 AM

    Hello I try to make qradar app using by SDK Framework.

    I got error message when I tried to qapp build

    Supplied manifest image version is 2.1.17, selecting base image 2.1.17
    Found base image docker-release.secintel.intranet.ibm.com/gaf/qradar-app-base:2.1.17
    Preparing image build directory /root/qradarappsdk/docker/build
    Checking Python dependency directory /usr/share/AISpera/myapp/container/pip
    Found file redis-4.6.0-py3-none-any.whl
    Found file Flask_WTF-1.0.0-py3-none-any.whl
    Found file marshmallow-3.14.1-py3-none-any.whl
    Found file WTForms-3.0.0-py3-none-any.whl
    Copying Python packages to /root/qradarappsdk/docker/build/container/pip
    Copying scripts to /root/qradarappsdk/docker/build/container/run
    Copying scripts to /root/qradarappsdk/docker/build/container/conf
    Using /root/qradarappsdk/docker/build/Dockerfile
    Creating Supervisor program entry for Flask
    Building image [myapp]
    Using user ID 0 and group ID 0
    DOCKER BUILD LOG: START
    Step 1/15 : FROM docker-release.secintel.intranet.ibm.com/gaf/qradar-app-base:2.1.17
    Step 2/15 : LABEL com.ibm.si.app.origin=SDK
    Step 3/15 : ARG APP_USER_ID
    Step 4/15 : ARG APP_GROUP_ID
    Step 5/15 : ARG APP_USER_NAME=appuser
    Step 6/15 : ARG APP_GROUP_NAME=appuser
    Step 7/15 : ENV APP_ROOT /opt/app-root
    Step 8/15 : ENV APP_USER_ID $APP_USER_ID
    Step 9/15 : ENV APP_GROUP_ID $APP_GROUP_ID
    Step 10/15 : ENV PATH $APP_ROOT/bin:$PATH
    Step 11/15 : COPY / $APP_ROOT
    Step 12/15 : RUN groupadd -o -g $APP_GROUP_ID $APP_GROUP_NAME && \
    useradd -l -u $APP_USER_ID -g $APP_GROUP_ID $APP_USER_NAME && \
    mkdir -p /etc/supervisord.d && \
    if [ -f $APP_ROOT/init/supervisord.conf ]; then mv $APP_ROOT/init/supervisord.conf /etc; fi && \
    rm -rf $APP_ROOT/init/* && \
    if [ -d $APP_ROOT/bin ]; then chmod -R 755 $APP_ROOT/bin; fi && \
    if [ -d $APP_ROOT/container/build ]; then chmod -R 755 $APP_ROOT/container/build; fi && \
    if [ -d $APP_ROOT/container/run ]; then chmod -R 755 $APP_ROOT/container/run; fi && \
    if [ -d $APP_ROOT/container/clean ]; then chmod -R 755 $APP_ROOT/container/clean; fi && \
    if [ -d $APP_ROOT/container/service ]; then chmod -R 755 $APP_ROOT/container/service; fi && \
    if [ -d $APP_ROOT/startup.d ]; then chmod -R 755 $APP_ROOT/startup.d; fi && \
    if [ -d $APP_ROOT/container/conf/supervisord.d ]; then mv $APP_ROOT/container/conf/supervisord.d/*.conf /etc/supervisord.d; fi && \
    if [ -d /etc/supervisord.d ]; then chmod -R 755 /etc/supervisord.d ; fi && \
    echo -e "appuser ALL=(ALL) NOPASSWD:ALL\n" >> /etc/sudoers && \
    visudo -cf /etc/sudoers
    useradd: UID 0 is not unique
    The command '/bin/sh -c groupadd -o -g $APP_GROUP_ID $APP_GROUP_NAME && \
    useradd -l -u $APP_USER_ID -g $APP_GROUP_ID $APP_USER_NAME && \
    mkdir -p /etc/supervisord.d && \
    if [ -f $APP_ROOT/init/supervisord.conf ]; then mv $APP_ROOT/init/supervisord.conf /etc; fi && \
    rm -rf $APP_ROOT/init/* && \
    if [ -d $APP_ROOT/bin ]; then chmod -R 755 $APP_ROOT/bin; fi && \
    if [ -d $APP_ROOT/container/build ]; then chmod -R 755 $APP_ROOT/container/build; fi && \
    if [ -d $APP_ROOT/container/run ]; then chmod -R 755 $APP_ROOT/container/run; fi && \
    if [ -d $APP_ROOT/container/clean ]; then chmod -R 755 $APP_ROOT/container/clean; fi && \
    if [ -d $APP_ROOT/container/service ]; then chmod -R 755 $APP_ROOT/container/service; fi && \
    if [ -d $APP_ROOT/startup.d ]; then chmod -R 755 $APP_ROOT/startup.d; fi && \
    if [ -d $APP_ROOT/container/conf/supervisord.d ]; then mv $APP_ROOT/container/conf/supervisord.d/*.conf /etc/supervisord.d; fi && \
    if [ -d /etc/supervisord.d ]; then chmod -R 755 /etc/supervisord.d ; fi && \
    echo -e "appuser ALL=(ALL) NOPASSWD:ALL\n" >> /etc/sudoers && \
    visudo -cf /etc/sudoers' returned a non-zero code: 4
    DOCKER BUILD LOG: END
    Cleaning up build remnants
    Build failed: see DOCKER BUILD LOG above for error details

    I think the problematic part is 'Using user ID 0 and group ID 0'. 

    please help me

    Thank you



    ------------------------------
    BOGAP HWANG
    ------------------------------



  • 2.  RE: Qapp build error

    Posted Mon August 21, 2023 04:55 AM

    In what environment have you installed the SDK? It looks like you're running as root on a Linux box. The SDK should be run on a developer laptop under your standard user account.



    ------------------------------
    Michael Benson
    ------------------------------