Skip to content

Commit

Permalink
feat: remove smart cache system in zsh
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala committed Mar 6, 2024
1 parent fd1811e commit f09cedc
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions zsh/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# This Dockerfile image is optimized to maximize Docker layer cache usage among
# the builds of the different image tags. Since the different tags of the image
# are built at the same time, we can cache the dependency-installation step
# and then copy the zsh image (the thing that changes between tags) on top of it.
#
# Idea taken from: https://stackoverflow.com/a/48545669/5798232.
#
# Step 1: reference the parent image in a pre-build step.
# Step 2: copy the parent image filesystem on top of our new image, *after*
# dependencies have been installed.

## PRE-BUILD STEP
ARG ZSH_VERSION=latest
FROM zshusers/zsh:${ZSH_VERSION} as zsh


## MAIN IMAGE BUILD

# IMPORTANT: this is the image that zshusers/zsh is based on. We need to use
# the same for compatibility so that there are no conflicts in the COPY step.
FROM bitnami/minideb:buster
FROM zshusers/zsh:${ZSH_VERSION}

# image metadata
LABEL org.opencontainers.image.title="ohmyzsh/zsh"
Expand All @@ -37,8 +18,5 @@ RUN install_packages \
git \
curl

# this is the point where we copy Zsh from the parent image
COPY --from=zsh / /

# install ohmyzsh
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

0 comments on commit f09cedc

Please sign in to comment.