Skip to content

Commit

Permalink
Update Docker images that are not included in the automation (#35940)
Browse files Browse the repository at this point in the history
So, we don't have security reports from Snyk.
  • Loading branch information
rdner committed Jun 29, 2023
1 parent b9c4a6b commit 84e64e2
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
12 changes: 9 additions & 3 deletions filebeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
FROM golang:1.19.9
FROM golang:1.19.10

RUN \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libsystemd-dev \
netcat \
netcat-openbsd \
rsync \
python3 \
python3-pip \
python3-venv \
libpcap-dev \
&& rm -rf /var/lib/apt/lists/*

# Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts
# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668.
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip3 install --upgrade pip==20.1.1
RUN pip3 install --upgrade setuptools==47.3.2
RUN pip3 install --upgrade docker-compose==1.23.2
RUN pip3 install --upgrade PyYAML==6.0.0
3 changes: 3 additions & 0 deletions filebeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ func PythonIntegTest(ctx context.Context) error {
mg.Deps(devtools.BuildSystemTestBinary)
args := devtools.DefaultPythonTestIntegrationArgs()
args.Env["MODULES_PATH"] = devtools.CWD("module")
// Always create a fresh virtual environment when running tests in a container, until we get
// get the requirements installed as part of the container build.
args.ForceCreateVenv = true
return devtools.PythonTest(args)
})
}
12 changes: 8 additions & 4 deletions libbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
FROM golang:1.19.9
FROM golang:1.19.10

RUN \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
netcat \
netcat-openbsd \
libpcap-dev \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*

# Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts
# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668.
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip3 install --upgrade pip==20.1.1
RUN pip3 install --upgrade setuptools==47.3.2
RUN pip3 install --upgrade docker-compose==1.23.2

# Libbeat specific
RUN mkdir -p /etc/pki/tls/certs
3 changes: 3 additions & 0 deletions x-pack/filebeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ func PythonIntegTest(ctx context.Context) error {
mg.Deps(devtools.BuildSystemTestBinary)
args := devtools.DefaultPythonTestIntegrationArgs()
args.Env["MODULES_PATH"] = devtools.CWD("module")
// Always create a fresh virtual environment when running tests in a container, until we get
// get the requirements installed as part of the container build.
args.ForceCreateVenv = true
return devtools.PythonTest(args)
})
}
12 changes: 8 additions & 4 deletions x-pack/libbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
FROM golang:1.19.5
FROM golang:1.19.10

RUN \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
netcat \
netcat-openbsd \
rsync \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*

# Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts
# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668.
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip3 install --upgrade pip==20.1.1
RUN pip3 install --upgrade setuptools==47.3.2
RUN pip3 install --upgrade docker-compose==1.23.2

# Setup work environment
ENV LIBBEAT_PATH /go/src/github.com/elastic/beats/x-pack/libbeat
Expand Down

0 comments on commit 84e64e2

Please sign in to comment.