Skip to content

Commit 2f7552b

Browse files
authored
Merge pull request #185 from Achiefs/174-release-packages-script
Added explicit architecture Dockerfiles
2 parents c5a24be + df8039a commit 2f7552b

6 files changed

Lines changed: 55 additions & 4 deletions

File tree

pkg/deb/docker/Dockerfile.amd64

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:xenial
2+
3+
RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
4+
sed -i 's|deb http://security|#deb http://security|g' /etc/apt/sources.list && \
5+
apt update && \
6+
apt install -y curl devscripts equivs tar gcc gzip pkg-config git && \
7+
mkdir -p /tmp/output
8+
9+
# It requires to copy the entrypoint.sh to the docker folder.
10+
ADD entrypoint.sh /usr/local/bin/entrypoint_deb.sh
11+
RUN chmod +x /usr/local/bin/entrypoint_deb.sh
12+
13+
ENTRYPOINT [ "/usr/local/bin/entrypoint_deb.sh" ]

pkg/deb/docker/Dockerfile.arm64

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:xenial
2+
3+
RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
4+
sed -i 's|deb http://security|#deb http://security|g' /etc/apt/sources.list && \
5+
apt update && \
6+
apt install -y curl devscripts equivs tar gcc gzip pkg-config git && \
7+
mkdir -p /tmp/output
8+
9+
# It requires to copy the entrypoint.sh to the docker folder.
10+
ADD entrypoint.sh /usr/local/bin/entrypoint_deb.sh
11+
RUN chmod +x /usr/local/bin/entrypoint_deb.sh
12+
13+
ENTRYPOINT [ "/usr/local/bin/entrypoint_deb.sh" ]

pkg/deb/docker/entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22

3+
set -xe
4+
35
ref=$1
46

5-
mkdir -p /tmp/output
67
mkdir -p /tmp/repo
78
cd /tmp/repo
89
git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1
910
cd fim/pkg/deb
1011
./builder.sh
1112
cp fim_*.deb /tmp/output/
12-
chown 1000:1000 /tmp/output/*
13+
chown 1000:1000 /tmp/output/fim_*.deb

pkg/rpm/docker/Dockerfile.aarch64

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM redhat/ubi8:8.8-1067.1698056881
2+
3+
RUN yum update -y && \
4+
yum install -y rpm-build tar gcc git && \
5+
mkdir -p /tmp/output
6+
7+
ADD entrypoint.sh /usr/local/bin/entrypoint_rpm.sh
8+
RUN chmod +x /usr/local/bin/entrypoint_rpm.sh
9+
10+
ENTRYPOINT [ "/usr/local/bin/entrypoint_rpm.sh" ]

pkg/rpm/docker/Dockerfile.x86_64

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM centos:7
2+
3+
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/* && \
4+
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/*
5+
6+
RUN yum update -y && \
7+
yum install -y rpm-build tar gcc git && \
8+
mkdir -p /tmp/output
9+
10+
ADD entrypoint.sh /usr/local/bin/entrypoint_rpm.sh
11+
RUN chmod +x /usr/local/bin/entrypoint_rpm.sh
12+
13+
ENTRYPOINT [ "/usr/local/bin/entrypoint_rpm.sh" ]

pkg/rpm/docker/entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22

3+
set -xe
4+
35
ref=$1
46

5-
mkdir -p /tmp/output
67
mkdir -p /tmp/repo
78
cd /tmp/repo
89
git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1
910
cd fim/pkg/rpm
1011
./builder.sh
1112
cp fim-*.rpm /tmp/output/
12-
chown 1000:1000 /tmp/output/*
13+
chown 1000:1000 /tmp/output/fim-*.rpm

0 commit comments

Comments
 (0)