Skip to content

Commit

Permalink
misc: Update Dockerfile for multiple distributions
Browse files Browse the repository at this point in the history
Update Docker file for lastest distributions
such as latest fedora, ubuntu, CentOS, Rocky Linux
and opensuse 15

Reported-by: Paran Lee <[email protected]>
Signed-off-by: JeongWan Gho <[email protected]>
Signed-off-by: Yusun Choi <[email protected]>
Signed-off-by: Paran Lee <[email protected]>
  • Loading branch information
ghojeong authored and paranlee committed Oct 15, 2024
1 parent b47a765 commit 638fb16
Show file tree
Hide file tree
Showing 16 changed files with 203 additions and 2 deletions.
11 changes: 11 additions & 0 deletions misc/docker/alpine/3.15/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.15
ARG test
RUN apk update
RUN apk add build-base linux-headers git bash libunwind-dev
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "${test}" == "yes" ] ; then \
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make install; \
fi
11 changes: 11 additions & 0 deletions misc/docker/alpine/3.16/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.16
ARG test
RUN apk update
RUN apk add build-base linux-headers git bash libunwind-dev
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "${test}" == "yes" ] ; then \
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make install; \
fi
20 changes: 20 additions & 0 deletions misc/docker/centos/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM centos:8
ARG test

# setting package manager
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
RUN dnf install -y 'dnf-command(config-manager)'
RUN dnf config-manager --set-enabled powertools

RUN dnf -y install gcc gcc-c++ git make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
20 changes: 20 additions & 0 deletions misc/docker/centos/latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM centos:latest
ARG test

# setting package manager
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
RUN dnf install -y 'dnf-command(config-manager)'
RUN dnf config-manager --set-enabled powertools

RUN dnf -y install gcc gcc-c++ git make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
2 changes: 1 addition & 1 deletion misc/docker/fedora/33/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM fedora:33
ARG test
RUN yum install -y git gcc make
RUN yum install -y git gcc make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
Expand Down
2 changes: 1 addition & 1 deletion misc/docker/fedora/34/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM fedora:34
ARG test
RUN yum install -y git gcc make
RUN yum install -y git gcc make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
Expand Down
12 changes: 12 additions & 0 deletions misc/docker/fedora/35/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM fedora:35
ARG test
RUN yum install -y git gcc make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
12 changes: 12 additions & 0 deletions misc/docker/fedora/36/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM fedora:36
ARG test
RUN dnf install -y git gcc make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
12 changes: 12 additions & 0 deletions misc/docker/fedora/37/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM fedora:37
ARG test
RUN dnf install -y git gcc make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
12 changes: 12 additions & 0 deletions misc/docker/fedora/latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM fedora:latest
ARG test
RUN yum install -y git gcc make libasan libubsan
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
14 changes: 14 additions & 0 deletions misc/docker/opensuse/15/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM opensuse/leap:15
ARG test
RUN zypper install -y gcc git make
RUN zypper install -y pandoc libdw-devel python3-devel ncurses-devel pkg-config libstdc++-devel
RUN zypper install -y luajit-devel libcapstone-devel
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
14 changes: 14 additions & 0 deletions misc/docker/opensuse/latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM opensuse/leap:latest
ARG test
RUN zypper install -y gcc git make
RUN zypper install -y pandoc libdw-devel python3-devel ncurses-devel pkg-config libstdc++-devel
RUN zypper install -y luajit-devel libcapstone-devel
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
15 changes: 15 additions & 0 deletions misc/docker/rockylinux/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM rockylinux:8
ARG test
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
RUN dnf --enablerepo=powertools install -y pandoc
RUN dnf install -y gcc gcc-c++ git make libasan libubsan epel-release
RUN dnf install -y elfutils-devel python3-devel ncurses-devel luajit-devel capstone-devel
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
16 changes: 16 additions & 0 deletions misc/docker/rockylinux/9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM rockylinux:9
ARG test
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
RUN dnf install -y wget gcc gcc-c++ git make libasan libubsan epel-release
RUN dnf install -y elfutils-devel python3-devel ncurses-devel luajit-devel capstone-devel
RUN wget https://github.com/jgm/pandoc/releases/download/2.19.2/pandoc-2.19.2-linux-amd64.tar.gz
RUN tar xvzf pandoc-2.19.2-linux-amd64.tar.gz --strip-components 1 -C /usr/local/
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
16 changes: 16 additions & 0 deletions misc/docker/ubuntu/20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:20.04
ARG test
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends git gcc make ca-certificates
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
16 changes: 16 additions & 0 deletions misc/docker/ubuntu/22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:22.04
ARG test
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends git gcc make ca-certificates
RUN mkdir -p /usr/src
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace
RUN if [ "$test" = "yes" ] ; then \
cd /usr/src/uftrace \
&& ./misc/install-deps.sh -y \
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \
else \
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \
fi
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*

0 comments on commit 638fb16

Please sign in to comment.