Skip to content

Instantly share code, notes, and snippets.

@rgov
Created August 5, 2022 14:38
Show Gist options
  • Save rgov/52c7ba0863381bf51fb4d5dfb2218913 to your computer and use it in GitHub Desktop.
Save rgov/52c7ba0863381bf51fb4d5dfb2218913 to your computer and use it in GitHub Desktop.
Dockerfile starter for CentOS 6
FROM centos:6.10
# Switch to using the Vault repos. The upstream image refers to package mirrors
# that no longer exist for this old release of CentOS.
RUN sed -i \
-e '/^mirrorlist/d' \
-e 's|^#baseurl=.*$releasever/|baseurl=http://vault.centos.org/6.10/|' \
/etc/yum.repos.d/CentOS-Base.repo
# Update all base image packages
RUN yum -y update \
&& yum -y clean all \
&& rm -rf /var/cache
# Install yum package dependencies
RUN yum -y install \
CUSTOMIZE HERE \
&& yum -y clean all \
&& rm -rf /var/cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment