forked from smart-tool/smart
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.fedora-aarch64
33 lines (28 loc) · 1.13 KB
/
Dockerfile.fedora-aarch64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- Dockerfile -*-
# podman build -t smart-fc-aarch64 . -f Dockerfile.fedora-aarch64
# podman run -it smart-fc-aarch64 bash --login -i
ARG BASE_IMAGE=fedora
#FROM ${BASE_IMAGE}
FROM fedora:39-aarch64
# Test with non-root user.
ENV TEST_USER tester
ENV WORK_DIR "/work"
#RUN uname -a
#RUN echo -e "deltarpm=0\ninstall_weak_deps=0\ntsflags=nodocs" >> /etc/dnf/dnf.conf
# Disable modular repositories to save a running time of "dnf update"
#RUN ls /etc/yum.repos.d/*.repo
#RUN sed -i '/^enabled=1$/ s/1/0/' /etc/yum.repos.d/*-modular.repo || true
#RUN dnf -y update
RUN dnf -y --allowerasing --repo fedora install \
file gcc make redhat-rpm-config sudo
#RUN dnf -y --repo fedora install m4 libtool perl-Text-Diff pkgconf-pkg-config strace gdb
#RUN dnf -y --repo fedora install strace gdb
# Create test user and the environment
RUN useradd "${TEST_USER}"
WORKDIR "${WORK_DIR}"
COPY . .
RUN chown -R "${TEST_USER}:${TEST_USER}" "${WORK_DIR}"
# Enable sudo without password for convenience.
RUN echo "${TEST_USER} ALL = NOPASSWD: ALL" >> /etc/sudoers
#RUN ln -s /usr/aarch64-linux-gnu/sys-root/usr/bin/ld.so /lib/ld-linux-aarch64.so.1
USER "${TEST_USER}"