GitLab system status is available here and here

Commit 9f9b35fe authored by Kabir Kwatra's avatar Kabir Kwatra
Browse files

Reduced Layer Count and added Gitlab CI container building

parent e24b4204
......@@ -2,9 +2,9 @@ FROM alpine
LABEL maintainer="kabir@kwatra.me"
ARG USER=kabir
ARG SHELL=fish
ARG BUILD_DATE=""
ARG VCS_REF=""
ARG BUILD_VERSION=""
ARG OCI_NAME="kabirkwatra/dotfiles"
ARG OCI_AUTHOR="Kabir Kwatra"
ARG OCI_DESCRIPTION="Kabir Kwatra's Containerized DotFiles"
......@@ -13,43 +13,39 @@ ARG OCI_SRC_URL="https://github.com/kabirkwatra/dotfiles"
ARG OCI_LICENSE="AGPL-3.0"
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$BUILD_VERSION \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
ENV SHELL=fish
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VCS_REF \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VCS_REF \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
RUN apk update && \
apk add --no-cache \
sudo \
$SHELL \
tzdata \
shadow
RUN useradd -ms /usr/bin/$SHELL $USER
RUN echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
shadow && \
useradd -ms /usr/bin/$SHELL $USER && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USER
ENV HOME /home/$USER/
ENV SHELL /usr/bin/$SHELL
WORKDIR $HOME
COPY . .local/share/chezmoi/
RUN sudo chown $USER -R .local
COPY --chown=$USER . .local/share/chezmoi/
RUN SETUP_SCRIPT=$HOME/.local/share/chezmoi/executable_dot_setup.sh && \
sudo chmod +x $SETUP_SCRIPT && \
......
......@@ -2,9 +2,9 @@ FROM archlinux
LABEL maintainer="kabir@kwatra.me"
ARG USER=kabir
ARG SHELL=fish
ARG BUILD_DATE=""
ARG VCS_REF=""
ARG BUILD_VERSION=""
ARG OCI_NAME="kabirkwatra/dotfiles"
ARG OCI_AUTHOR="Kabir Kwatra"
ARG OCI_DESCRIPTION="Kabir Kwatra's Containerized DotFiles"
......@@ -13,40 +13,37 @@ ARG OCI_SRC_URL="https://github.com/kabirkwatra/dotfiles"
ARG OCI_LICENSE="AGPL-3.0"
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$BUILD_VERSION \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
ENV SHELL=fish
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VCS_REF \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VCS_REF \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
RUN pacman -Syu --noconfirm \
sudo \
$SHELL \
tzdata
RUN useradd -ms /usr/bin/$SHELL $USER
RUN echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
tzdata && \
useradd -ms /usr/bin/$SHELL $USER && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USER
WORKDIR /home/$USER/
COPY . .local/share/chezmoi/
ENV HOME /home/$USER/
ENV SHELL /usr/bin/$SHELL
WORKDIR $HOME
RUN sudo chown $USER -R .local
COPY --chown=$USER . .local/share/chezmoi/
RUN SETUP_SCRIPT=$HOME/.local/share/chezmoi/executable_dot_setup.sh && \
sudo chmod +x $SETUP_SCRIPT && \
......
......@@ -2,9 +2,9 @@ FROM debian
LABEL maintainer="kabir@kwatra.me"
ARG USER=kabir
ARG SHELL=fish
ARG BUILD_DATE=""
ARG VCS_REF=""
ARG BUILD_VERSION=""
ARG OCI_NAME="kabirkwatra/dotfiles"
ARG OCI_AUTHOR="Kabir Kwatra"
ARG OCI_DESCRIPTION="Kabir Kwatra's Containerized DotFiles"
......@@ -13,42 +13,39 @@ ARG OCI_SRC_URL="https://github.com/kabirkwatra/dotfiles"
ARG OCI_LICENSE="AGPL-3.0"
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$BUILD_VERSION \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
ENV SHELL=fish
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VCS_REF \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VCS_REF \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -qq \
sudo \
$SHELL \
tzdata
RUN useradd -ms /usr/bin/$SHELL $USER
RUN echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
tzdata && \
useradd -ms /usr/bin/$SHELL $USER && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USER
WORKDIR /home/$USER/
COPY . .local/share/chezmoi/
ENV HOME /home/$USER/
ENV SHELL /usr/bin/$SHELL
WORKDIR $HOME
RUN sudo chown $USER -R .local
COPY --chown=$USER . .local/share/chezmoi/
RUN SETUP_SCRIPT=$HOME/.local/share/chezmoi/executable_dot_setup.sh && \
sudo chmod +x $SETUP_SCRIPT && \
......
......@@ -2,9 +2,9 @@ FROM fedora
LABEL maintainer="kabir@kwatra.me"
ARG USER=kabir
ARG SHELL=fish
ARG BUILD_DATE=""
ARG VCS_REF=""
ARG BUILD_VERSION=""
ARG OCI_NAME="kabirkwatra/dotfiles"
ARG OCI_AUTHOR="Kabir Kwatra"
ARG OCI_DESCRIPTION="Kabir Kwatra's Containerized DotFiles"
......@@ -13,40 +13,37 @@ ARG OCI_SRC_URL="https://github.com/kabirkwatra/dotfiles"
ARG OCI_LICENSE="AGPL-3.0"
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$BUILD_VERSION \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
ENV SHELL=fish
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VCS_REF \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VCS_REF \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
RUN dnf install -y \
sudo \
$SHELL \
tzdata
RUN useradd -ms /usr/bin/$SHELL $USER
RUN echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
tzdata && \
useradd -ms /usr/bin/$SHELL $USER && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USER
WORKDIR /home/$USER/
COPY . .local/share/chezmoi/
ENV HOME /home/$USER/
ENV SHELL /usr/bin/$SHELL
WORKDIR $HOME
RUN sudo chown kabir -R .local
COPY --chown=$USER . .local/share/chezmoi/
RUN SETUP_SCRIPT=$HOME/.local/share/chezmoi/executable_dot_setup.sh && \
sudo chmod +x $SETUP_SCRIPT && \
......
......@@ -2,9 +2,9 @@ FROM ubuntu
LABEL maintainer="kabir@kwatra.me"
ARG USER=kabir
ARG SHELL=fish
ARG BUILD_DATE=""
ARG VCS_REF=""
ARG BUILD_VERSION=""
ARG OCI_NAME="kabirkwatra/dotfiles"
ARG OCI_AUTHOR="Kabir Kwatra"
ARG OCI_DESCRIPTION="Kabir Kwatra's Containerized DotFiles"
......@@ -13,42 +13,39 @@ ARG OCI_SRC_URL="https://github.com/kabirkwatra/dotfiles"
ARG OCI_LICENSE="AGPL-3.0"
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$BUILD_VERSION \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
ENV SHELL=fish
org.label-schema.name=$OCI_NAME \
org.label-schema.vendor=$OCI_AUTHOR \
org.label-schema.description=$OCI_DESCRIPTION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VCS_REF \
org.label-schema.vcs-url=$OCI_SRC_URL \
org.label-schema.url=$OCI_URL \
org.opencontainers.image.title=$OCI_NAME \
org.opencontainers.image.authors=$OCI_AUTHOR \
org.opencontainers.image.vendor=$OCI_AUTHOR \
org.opencontainers.image.description=$OCI_DESCRIPTION \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VCS_REF \
org.opencontainers.image.documentation=$OCI_SRC_URL \
org.opencontainers.image.url=$OCI_URL \
org.opencontainers.image.source=$OCI_SRC_URL \
org.opencontainers.image.licenses=$OCI_LICENSE
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -qq \
sudo \
$SHELL \
tzdata
RUN useradd -ms /usr/bin/$SHELL $USER
RUN echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
tzdata && \
useradd -ms /usr/bin/$SHELL $USER && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USER
WORKDIR /home/$USER/
COPY . .local/share/chezmoi/
ENV HOME /home/$USER/
ENV SHELL /usr/bin/$SHELL
WORKDIR $HOME
RUN sudo chown kabir -R .local
COPY --chown=$USER . .local/share/chezmoi/
RUN SETUP_SCRIPT=$HOME/.local/share/chezmoi/executable_dot_setup.sh && \
sudo chmod +x $SETUP_SCRIPT && \
......
# Author: Kabir Kwatra <kabir@kwatra.me>
image: docker:19
stages: [build]
before_script:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build:
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- >
for containerfile_path in $(ls .github/containerfiles/*.Containerfile)
do
containerfile_name=${containerfile_path##*/}
container_tag=${containerfile_name*/%%.*}
container_fulltag="CI_REGISTRY_IMAGE/$container_tag"
echo "Building $containerfile_name with tag $container_fulltag"
docker build \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg OCI_SRC_URL=$CI_PROJECT_URL \
--cache-from $container_fulltag \
-f $containerfile_path \
-t $container_fulltag \
.
docker push $container_fulltag
done
......@@ -2,6 +2,8 @@
## Chezmoi, Fish, Doom Emacs
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
<small>Quick Install</small>
``` sh
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment