Skip to content

Commit

Permalink
v3.3.0 (#72)
Browse files Browse the repository at this point in the history
## Major updates
* Using custom Nushell build
* Using latest Alpine branch
* Using rm instead of del
  • Loading branch information
bfren authored Oct 5, 2024
1 parent a74f88a commit 6d8bed2
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 45 deletions.
16 changes: 8 additions & 8 deletions 11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#======================================================================================================================
# STAGE 0: get build information and download Nushell
# STAGE 0: store build information
#======================================================================================================================

FROM --platform=${BUILDPLATFORM} golang:alpine AS build
Expand All @@ -10,21 +10,21 @@ RUN \
echo "Platform: ${TARGETPLATFORM}" >> /log && \
echo "Debian: 11.11" >> /log && \
echo "Busybox: 1.36.1" >> /log && \
echo "Nushell: 0.97.1" >> /log
echo "Nushell: 0.98.0" >> /log


#======================================================================================================================
# STAGE 1: load Nushell
# STAGE 1: load busybox
#======================================================================================================================

FROM ghcr.io/bfren/nushell:0.97.1-bullseye as nushell
FROM ghcr.io/bfren/busybox:1.36.1-debian11.11-240913 AS busybox


#======================================================================================================================
# STAGE 2: load busybox
# STAGE 2: load Nushell
#======================================================================================================================

FROM ghcr.io/bfren/busybox:1.36.1-debian11.11 AS busybox
FROM ghcr.io/bfren/nushell:0.98.0-bullseye-241005 AS nushell


#======================================================================================================================
Expand All @@ -37,7 +37,7 @@ WORKDIR /tmp
RUN \
# get the overlay from the Alpine base image
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.5.9 https://github.com/bfren/docker-alpine.git && \
apk add git && git clone --branch v2.7.0 https://github.com/bfren/docker-alpine.git && \
mv docker-alpine/overlay /


Expand Down Expand Up @@ -67,7 +67,7 @@ ENV \
# 1: yes
BF_UPGRADE_PACKAGES=0 \
# Nushell version string to check against installed verion after installation
NUSHELL_VERSION=0.97.1
NU_VERSION=0.98.0

RUN \
# delete all binaries that will be replaced by busybox - those in ${IGNORE} will be left alone
Expand Down
16 changes: 8 additions & 8 deletions 12/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#======================================================================================================================
# STAGE 0: get build information and download Nushell
# STAGE 0: store build information
#======================================================================================================================

FROM --platform=${BUILDPLATFORM} golang:alpine AS build
Expand All @@ -10,21 +10,21 @@ RUN \
echo "Platform: ${TARGETPLATFORM}" >> /log && \
echo "Debian: 12.7" >> /log && \
echo "Busybox: 1.36.1" >> /log && \
echo "Nushell: 0.97.1" >> /log
echo "Nushell: 0.98.0" >> /log


#======================================================================================================================
# STAGE 1: load Nushell
# STAGE 1: load busybox
#======================================================================================================================

FROM ghcr.io/bfren/nushell:0.97.1-bookworm as nushell
FROM ghcr.io/bfren/busybox:1.36.1-debian12.7-240913 AS busybox


#======================================================================================================================
# STAGE 2: load busybox
# STAGE 2: load Nushell
#======================================================================================================================

FROM ghcr.io/bfren/busybox:1.36.1-debian12.7 AS busybox
FROM ghcr.io/bfren/nushell:0.98.0-bookworm-241005 AS nushell


#======================================================================================================================
Expand All @@ -37,7 +37,7 @@ WORKDIR /tmp
RUN \
# get the overlay from the Alpine base image
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.5.9 https://github.com/bfren/docker-alpine.git && \
apk add git && git clone --branch v2.7.0 https://github.com/bfren/docker-alpine.git && \
mv docker-alpine/overlay /


Expand Down Expand Up @@ -67,7 +67,7 @@ ENV \
# 1: yes
BF_UPGRADE_PACKAGES=0 \
# Nushell version string to check against installed verion after installation
NUSHELL_VERSION=0.97.1
NU_VERSION=0.98.0

RUN \
# delete all binaries that will be replaced by busybox - those in ${IGNORE} will be left alone
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile.esh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#======================================================================================================================
# STAGE 0: get build information and download Nushell
# STAGE 0: store build information
#======================================================================================================================

FROM --platform=${BUILDPLATFORM} golang:alpine AS build
Expand All @@ -10,21 +10,21 @@ RUN \
echo "Platform: ${TARGETPLATFORM}" >> /log && \
echo "Debian: <%= ${DEBIAN_MINOR} %>" >> /log && \
echo "Busybox: <%= ${BUSYBOX_VERSION} %>" >> /log && \
echo "Nushell: <%= ${NUSHELL_VERSION} %>" >> /log
echo "Nushell: <%= ${NU_VERSION} %>" >> /log


#======================================================================================================================
# STAGE 1: load Nushell
# STAGE 1: load busybox
#======================================================================================================================

FROM ghcr.io/bfren/nushell:<%= ${NUSHELL_VERSION} %>-<%= ${DEBIAN_NAME} %> as nushell
FROM ghcr.io/bfren/busybox:<%= ${BUSYBOX_IMAGE} %> AS busybox


#======================================================================================================================
# STAGE 2: load busybox
# STAGE 2: load Nushell
#======================================================================================================================

FROM ghcr.io/bfren/busybox:<%= ${BUSYBOX_IMAGE} %> AS busybox
FROM ghcr.io/bfren/nushell:<%= ${NU_IMAGE} %> AS nushell


#======================================================================================================================
Expand Down Expand Up @@ -67,7 +67,7 @@ ENV \
# 1: yes
BF_UPGRADE_PACKAGES=0 \
# Nushell version string to check against installed verion after installation
NUSHELL_VERSION=<%= ${NUSHELL_VERSION} %>
NU_VERSION=<%= ${NU_VERSION} %>

RUN \
# delete all binaries that will be replaced by busybox - those in ${IGNORE} will be left alone
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.8
3.3.0
2 changes: 1 addition & 1 deletion VERSION_MINOR
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2
3.3
17 changes: 8 additions & 9 deletions generate-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ set -euo pipefail

docker pull bfren/alpine

ALPINE_BRANCH="v2.5.9"
ALPINE_BRANCH="v2.7.0"
BUSYBOX_VERSION="1.36.1"
NUSHELL_VERSION="0.97.1"
BUSYBOX_BUILD="240913"
NU_VERSION="0.98.0"
NU_BUILD="241005"
DEBIAN_VERSIONS="11 12"

for V in ${DEBIAN_VERSIONS} ; do

echo "Debian ${V}"
DEBIAN_MINOR=`cat ./${V}/DEBIAN_MINOR`
DEBIAN_NAME=`cat ./${V}/DEBIAN_NAME`

if [ "${DEBIAN_MINOR}" = "12.0" ] ; then
BUSYBOX_IMAGE="${BUSYBOX_VERSION}-debian12"
else
BUSYBOX_IMAGE="${BUSYBOX_VERSION}-debian${DEBIAN_MINOR}"
fi
BUSYBOX_IMAGE="${BUSYBOX_VERSION}-debian${DEBIAN_MINOR}-${BUSYBOX_BUILD}"
NU_IMAGE="${NU_VERSION}-${DEBIAN_NAME}-${NU_BUILD}"

DOCKERFILE=$(docker run \
-v ${PWD}:/ws \
Expand All @@ -34,7 +32,8 @@ for V in ${DEBIAN_VERSIONS} ; do
DEBIAN_NAME=${DEBIAN_NAME} \
BF_BIN=/usr/bin/bf \
BF_ETC=/etc/bf \
NUSHELL_VERSION=${NUSHELL_VERSION}
NU_IMAGE=${NU_IMAGE} \
NU_VERSION=${NU_VERSION}
)

echo "${DOCKERFILE}" > ./${V}/Dockerfile
Expand Down
22 changes: 12 additions & 10 deletions overlay/etc/nu/scripts/bf/clean.nu
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
use del.nu
use dump.nu
use env.nu
use fs.nu
use write.nu

# clean temporary directories, caches and installation files
export def main []: nothing -> nothing {
write debug "Deleting preinstallation script." clean
del force /preinstall
write debug "Deleting caches." clean
rm --force --recursive /tmp/* /var/lib/apt/lists/* /usr/share/man

write debug "Deleting .empty files." clean
del force **/.empty

write debug "Deleting caches." clean
del force /tmp/* /var/lib/apt/lists/* /usr/share/man
fs find_name "/" ".empty" | rm --force ...$in

if (env check PUBLISHING) {
write debug "Deleting test files." clean
del force /etc/nu/scripts/tests
write debug "Deleting preinstallation script." clean
rm --force /preinstall

write debug "Deleting tests module." clean
rm --force --recursive /etc/nu/scripts/tests
}

write ok "Done." clean
return
}
2 changes: 1 addition & 1 deletion overlay/etc/nu/scripts/bf/tz.nu
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export def main [

# copy timezone info
write $"Setting timezone to ($tz)." tz
del force $localtime
rm --force $localtime
^ln $zone $localtime
$tz | save --force $timezone

Expand Down

0 comments on commit 6d8bed2

Please sign in to comment.