代码拉取完成,页面将自动刷新
# Docker >= 17.05.0-ce allows using build-time args (ARG) in FROM (#31352).
# https://github.com/moby/moby/releases/tag/v17.05.0-ce
ARG BASE_IMAGE=fedora
FROM ${BASE_IMAGE}
# 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"
# if they exists.
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 install \
file \
gcc \
git \
make \
redhat-rpm-config \
sudo \
automake autoconf libtool perl-Text-Diff pkgconf-pkg-config
# 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
USER "${TEST_USER}"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。