Skip to content

Commit

Permalink
ci: Update Linux Docker image To Ubuntu 20.04
Browse files Browse the repository at this point in the history
Needed to support newer versions of NodeJS in the Github Actions.
  • Loading branch information
Smjert committed Jul 5, 2024
1 parent 9a46889 commit 7e9ee03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tools/ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ all:
# instance. Thus, these targets are for building and pushing to the
# remote, and building some test images locally.
container:
docker buildx build --platform linux/amd64,linux/arm64 -f osquery-ubuntu18.04-toolchain.dockerfile .
docker buildx build --platform linux/amd64,linux/arm64 -f osquery-ubuntu20.04-toolchain.dockerfile .

# push uses the cached builds from `container`
push: TAG = $(shell git rev-parse --short HEAD)
push: container
docker buildx build --platform linux/amd64,linux/arm64 --push -t osquery/builder18.04:$(TAG) -f osquery-ubuntu18.04-toolchain.dockerfile .
docker buildx build --platform linux/amd64,linux/arm64 --push -t osquery/builder20.04:$(TAG) -f osquery-ubuntu20.04-toolchain.dockerfile .

# These targets use --load, which pushes to the local docker
# install. Only a single platform is supported.
arm:
docker buildx build --platform linux/arm64 --load -t osquerybuilder:$@ -f osquery-ubuntu18.04-toolchain.dockerfile .
docker buildx build --platform linux/arm64 --load -t osquerybuilder:$@ -f osquery-ubuntu20.04-toolchain.dockerfile .
x86:
docker buildx build --platform linux/amd64 --load -t osquerybuilder:$@ -f osquery-ubuntu18.04-toolchain.dockerfile .
docker buildx build --platform linux/amd64 --load -t osquerybuilder:$@ -f osquery-ubuntu20.04-toolchain.dockerfile .
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:18.04 AS ubuntubase
FROM ubuntu:20.04 AS ubuntubase
RUN apt update -q -y
RUN apt upgrade -q -y
RUN apt install -q -y --no-install-recommends \
RUN DEBIAN_FRONTEND=noninteractive apt upgrade -q -y
RUN DEBIAN_FRONTEND=noninteractive apt install -q -y --no-install-recommends \
git \
make \
ccache \
Expand Down Expand Up @@ -64,6 +64,10 @@ RUN rm -rf /var/lib/apt/lists/*

FROM base3 AS base4
COPY --from=cppcheck /root/cppcheck/install/usr/local/ /usr/local/
# Add user for the Github Actions CI
RUN groupadd --gid 127 docker
RUN useradd runner --uid 1001 -G docker -s /bin/bash
RUN echo 'runner ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Squash all layers down using a giant COPY. It's kinda gross, but it
# works. Though the layers are only adding about 50 megs on a 1gb
Expand Down

0 comments on commit 7e9ee03

Please sign in to comment.