Sign inSign up

redstonewizard/ubuntu

By redstonewizard

•Updated over 4 years ago

A docker image built with Ubuntu's official core cloud images.

Image
0

159

redstonewizard/ubuntu repository overview

This is a docker image built with Ubuntu's official core cloud images. It uses Alpine Linux to download and extract the OS, and then another layer to export the files. Here is the Dockerfile:

FROM alpine as builder

# Arguments
ARG UBUNTU_BUILD=current
ARG UBUNTU_DISTRO=impish

# Install packages
RUN apk update && apk upgrade && apk add curl tar bash

# Use bash
ENV SHELL=/bin/bash
SHELL [ "/bin/bash", "-c" ]

# Download Ubuntu
WORKDIR /
RUN export UNAME_ARCH=$(uname -m) && \
    case ${UNAME_ARCH} in \
        aarch64) export ARCH=arm64 ;; \
        armv7l) export ARCH=armhf ;; \
        x86_64) export ARCH=amd64 ;; \
        ppc64le) export ARCH=ppc64el ;; \
        s390x) export ARCH=s390x ;; \
        *) echo "Unknown architecture: ${UNAME_ARCH}" && exit 1 ;; \
    esac && \
    curl -fsSLo /rootfs.tar.gz \
    https://partner-images.canonical.com/core/${UBUNTU_DISTRO}/${UBUNTU_BUILD}/ubuntu-impish-core-cloudimg-${ARCH}-root.tar.gz

# Extract Ubuntu
WORKDIR /
RUN mkdir /rootfs && \
    tar -zxf /rootfs.tar.gz -C /rootfs

# Add files
FROM scratch

# Copy files
COPY --from=builder /rootfs /

# Set startup
CMD [ "/bin/bash" ]

Tag summary

Content type

Image

Digest

Size

27.7 MB

Last updated

over 4 years ago

docker pull redstonewizard/ubuntu