-1

I have created below docker file to install JDK 16.0.2 version and Jmeter 5.5. While pushing changes in GitHub the "Build Jmeter Docker Image" steps are getting failed:

I could see following Error: debconf: delaying package configuration, since apt-utils is not installed. Could someone please advise the reason for the failure

jmeter.yml file

  name: JMeter Tests
    on:
      push:
        branches:
          - "booking-*"
    jobs:
      jmeter:
        runs-on: ubuntu-latest
        steps:
        - name: Checkout code
          uses: actions/checkout@v2
        - name: Build JMeter Docker image
          run: docker build -t my-jmeter:latest .
        - name: Run JMeter tests
          run: |
     docker run --rm \
      -v ${PWD}:${PWD} \
      -w ${PWD} \
      my-jmeter:latest \
      -n -t test/CloudRun.jmx -l results/CloudRdunResults.jtl

Below is my Dockerfile:

FROM openjdk:16-jdk-slim-buster

ENV JMETER_VERSION 5.5

RUN apt-get update && \
    apt-get install -y wget && \
    rm -rf /var/lib/apt/lists/*

RUN wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-${JMETER_VERSION}.tgz && \
    tar zxvf apache-jmeter-${JMETER_VERSION}.tgz && \
    rm apache-jmeter-${JMETER_VERSION}.tgz

ENV PATH $PATH:/apache-jmeter-${JMETER_VERSION}/bin
soccerway
  • 10,371
  • 19
  • 67
  • 132
  • Does this answer your question? [Docker: Having issues installing apt-utils](https://stackoverflow.com/questions/51023312/docker-having-issues-installing-apt-utils) – Azeem May 04 '23 at 04:54

1 Answers1

1

This debconf: delaying package configuration, since apt-utils is not installed. can be safely ignored as it's not an "error", it's a "warning".

It's hard to say why exactly your pipeline fail without seeing its full output, from the first glance your YAML syntax is invalid.

Try out this one:

name: JMeter Tests
on:
  push:
    branches:
      - "booking-*"
jobs:
  jmeter:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Build JMeter Docker image
        run: docker build -t my-jmeter:latest .
      - name: Run JMeter tests
        run: |
          docker run --rm \
          my-jmeter:latest \
          jmeter -n -t /apache-jmeter-5.5/extras/Test.jmx

It should build the image and run the test successfully. Then amend it according to your needs.

More information: How to Use Docker with JMeter

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Sorry my jmeter test file in available in e2e-automation repo under the folder called `jmeter/test/CloudRun.jmx` and results should be copied under `jmeter/results/CloudRunResults.jtl` folder. So in this case how can perform docker run based on the `my-jmeter:latest` image ? – soccerway May 04 '23 at 10:53