Skip to content

Commit

Permalink
Switch to Ubuntu 20.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakerouse committed Jan 4, 2022
1 parent fc7b8fc commit 2b61b70
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function dockerPullCommonImages() {
docker.elastic.co/observability-ci/database-enterprise:12.2.0.1
docker.elastic.co/beats-dev/fpm:1.11.0
golang:1.14.12-stretch
centos:7
ubuntu:20.04
"
for image in ${DOCKER_IMAGES} ; do
(retry 2 docker pull ${image}) || echo "Error pulling ${image} Docker image. Continuing."
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-venv \
Expand Down
18 changes: 10 additions & 8 deletions dev-tools/packaging/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ shared:
- &agent_docker_spec
<<: *agent_binary_spec
extra_vars:
from: 'centos:7'
buildFrom: 'centos:7'
from: 'ubuntu:20.04'
buildFrom: 'ubuntu:20.04'
dockerfile: 'Dockerfile.elastic-agent.tmpl'
docker_entrypoint: 'docker-entrypoint.elastic-agent.tmpl'
user: '{{ .BeatName }}'
Expand All @@ -495,8 +495,8 @@ shared:
- &agent_docker_arm_spec
<<: *agent_docker_spec
extra_vars:
from: 'arm64v8/centos:7'
buildFrom: 'arm64v8/centos:7'
from: 'arm64v8/ubuntu:20.04'
buildFrom: 'arm64v8/ubuntu:20.04'

- &agent_docker_cloud_spec
<<: *agent_docker_spec
Expand Down Expand Up @@ -653,8 +653,8 @@ shared:
- &docker_spec
<<: *binary_spec
extra_vars:
from: 'centos:7'
buildFrom: 'centos:7'
from: 'ubuntu:20.04'
buildFrom: 'ubuntu:20.04'
user: '{{ .BeatName }}'
linux_capabilities: ''
files:
Expand All @@ -666,14 +666,16 @@ shared:
- &docker_arm_spec
<<: *docker_spec
extra_vars:
from: 'arm64v8/centos:7'
buildFrom: 'arm64v8/centos:7'
from: 'arm64v8/ubuntu:20.04'
buildFrom: 'arm64v8/ubuntu:20.04'

# TODO: Did I must change those to ?
- &docker_ubi_spec
extra_vars:
image_name: '{{.BeatName}}-ubi8'
from: 'docker.elastic.co/ubi8/ubi-minimal'

# TODO: Did I must change those to ?
- &docker_arm_ubi_spec
extra_vars:
image_name: '{{.BeatName}}-ubi8'
Expand Down
32 changes: 16 additions & 16 deletions dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,26 @@ ENV BEAT_SETUID_AS={{ .user }}
{{- if contains .from "ubi-minimal" }}
RUN for iter in {1..10}; do microdnf update -y && microdnf install -y shadow-utils jq && microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)
{{- else }}
# Installing jq needs to be installed after epel-release and cannot be in the same yum install command.
RUN case $(arch) in aarch64) YUM_FLAGS="-x bind-license";; esac; \
for iter in {1..10}; do \
yum update -y $YUM_FLAGS && \
yum install -y epel-release && \
yum update -y $YUM_FLAGS && \
yum install -y jq && \
yum clean all && \
exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; \

RUN for iter in {1..10}; do \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes jq && \
apt-get clean all && \
exit_code=0 && break || exit_code=$? && echo "apt-get error: retry $iter in 10s" && sleep 10; \
done; \
(exit $exit_code)
{{- end }}

{{- if (and (contains .image_name "-complete") (not (contains .from "ubi-minimal"))) }}
RUN for iter in {1..10}; do \
yum -y install atk gtk gdk xrandr pango libXcomposite libXcursor libXdamage \
libXext libXi libXtst libXScrnSaver libXrandr GConf2 \
alsa-lib atk gtk3 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils \
xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc \
yum clean all && \
exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; \
RUN apt-get update -y && \
for iter in {1..10}; do \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \
libatk1.0-0 libgdk-pixbuf2.0-dev x11-xserver-utils libpango-1.0-0 libxcomposite-dev libxcursor-dev \
libxdamage-dev libxext-dev libxi-dev libxtst-dev libxss-dev libxrandr-dev gconf2 \
libasound2 fonts-ipafont-gothic xfonts-100dpi xfonts-75dpi xfonts-cyrillic xfonts-scalable \
xfonts-base x11-utils &&\
apt-get clean all && \
exit_code=0 && break || exit_code=$? && echo "apt-get error: retry $iter in 10s" && sleep 10; \
done; \
(exit $exit_code)
ENV NODE_PATH={{ $beatHome }}/.node
Expand Down Expand Up @@ -213,3 +212,4 @@ RUN echo -e '#!/bin/sh\nexec /usr/local/bin/docker-entrypoint' > /app/apm.sh &&
{{- else }}
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/docker-entrypoint"]
{{- end }}

2 changes: 1 addition & 1 deletion filebeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libsystemd-dev \
netcat \
rsync \
Expand Down
2 changes: 1 addition & 1 deletion heartbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
netcat \
python3 \
python3-pip \
Expand Down
2 changes: 1 addition & 1 deletion libbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
netcat \
libpcap-dev \
python3 \
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt update \
&& apt install -qq -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends \
netcat \
python3 \
python3-dev \
Expand Down
2 changes: 1 addition & 1 deletion packetbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-venv \
Expand Down
2 changes: 1 addition & 1 deletion x-pack/functionbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
netcat \
rsync \
python3 \
Expand Down
2 changes: 1 addition & 1 deletion x-pack/libbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17.5

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
netcat \
rsync \
python3 \
Expand Down

0 comments on commit 2b61b70

Please sign in to comment.