Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
docker: Perform system upgrade
Browse files Browse the repository at this point in the history
On Debian and Ubutnu perform `apt-get upgrade`.
  • Loading branch information
RoEdAl committed May 7, 2024
1 parent b4d2e47 commit 8adfb6c
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 11 deletions.
5 changes: 3 additions & 2 deletions docker/debian/10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FROM task-base AS base

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
task -d /build/task.d/deb install-pkgs -- file build-essential dpkg-dev ca-certificates jq libsqlite3-dev libssl1.1
task -d /build/task.d/deb upgrade-and-install-pkgs -- file build-essential dpkg-dev ca-certificates jq libsqlite3-dev libssl1.1
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down Expand Up @@ -135,7 +135,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
#!/bin/bash -e

apt-get -qq update -y
apt-get -qq install -y --no-install-recommends libsqlite3-dev libasound2-dev
apt-get -qq upgrade -y --no-install-recommends
apt-get -qq install -y --no-install-recommends libsqlite3-dev libasound2-dev
EOF

FROM rpi-debian AS rpi-debian-asterisk-dev
Expand Down
5 changes: 3 additions & 2 deletions docker/debian/11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FROM task-base AS base

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
task -d /build/task.d/deb install-pkgs -- file build-essential dpkg-dev ca-certificates jq libsqlite3-dev libssl1.1
task -d /build/task.d/deb upgrade-and-install-pkgs -- file build-essential dpkg-dev ca-certificates jq libsqlite3-dev libssl1.1
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down Expand Up @@ -142,7 +142,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
#!/bin/bash -e

apt-get -qq update -y
apt-get -qq install -y --no-install-recommends asterisk-dev
apt-get -qq upgrade -y --no-install-recommends
apt-get -qq install -y --no-install-recommends asterisk-dev
EOF

FROM chan-quectel-base AS chan-quectel-rpi-base
Expand Down
3 changes: 2 additions & 1 deletion docker/debian/12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FROM task-base AS base

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
task -d /build/task.d/deb install-pkgs -- file build-essential dpkg-dev ca-certificates jq libsqlite3-dev libssl3
task -d /build/task.d/deb upgrade-and-install-pkgs -- file build-essential dpkg-dev ca-certificates jq libsqlite3-dev libssl3
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down Expand Up @@ -114,6 +114,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
#!/bin/bash -e

apt-get -qq update -y
apt-get -qq upgrade -y --no-install-recommends
apt-get -qq install -y --no-install-recommends asterisk-dev
EOF

Expand Down
2 changes: 1 addition & 1 deletion docker/rpi-debian/10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY --from=task deb /build/task.d/deb
FROM task-base AS base
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked -- \
task -d /build/task.d/deb install-pkgs -- file ca-certificates jq dpkg-dev libsqlite3-dev libssl1.1
task -d /build/task.d/deb upgrade-and-install-pkgs -- file ca-certificates jq dpkg-dev libsqlite3-dev libssl1.1
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down
2 changes: 1 addition & 1 deletion docker/rpi-debian/11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY --from=task deb /build/task.d/deb
FROM task-base AS base
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked -- \
task -d /build/task.d/deb install-pkgs -- file ca-certificates jq dpkg-dev libsqlite3-dev libssl1.1
task -d /build/task.d/deb upgrade-and-install-pkgs -- file ca-certificates jq dpkg-dev libsqlite3-dev libssl1.1
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down
2 changes: 1 addition & 1 deletion docker/rpi-debian/12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY --from=task deb /build/task.d/deb
FROM task-base AS base
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked -- \
task -d /build/task.d/deb install-pkgs -- file ca-certificates jq dpkg-dev libsqlite3-dev libssl3
task -d /build/task.d/deb upgrade-and-install-pkgs -- file ca-certificates jq dpkg-dev libsqlite3-dev libssl3
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down
10 changes: 10 additions & 0 deletions docker/task.d/deb/Taskfile.dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ tasks:
silent: true
- apt-get -qq install -y --no-install-recommends {{.CLI_ARGS}}

upgrade-and-install-pkgs:
desc: Install specified packages (DEB)
env:
DEBIAN_FRONTEND: noninteractive
cmds:
- cmd: apt-get -qq update -y
silent: true
- apt-get -qq upgrade -y --no-install-recommends
- apt-get -qq install -y --no-install-recommends {{.CLI_ARGS}}

install-pkgs-arch:
desc: Adds architecture and install specified packages
preconditions:
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu/20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN --network=none --mount=type=bind,from=dl-arm-gnu-toolchain,target=/build/dow
FROM task-base AS base
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked -- \
task -d /build/task.d/deb install-pkgs -- file build-essential ca-certificates jq dpkg-dev libsqlite3-dev libssl1.1
task -d /build/task.d/deb upgrade-and-install-pkgs -- file build-essential ca-certificates jq dpkg-dev libsqlite3-dev libssl1.1
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu/22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ARG ARM_GNU_TOOLCHAIN_VER

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
task -d /build/task.d/deb install-pkgs -- xz-utils
task -d /build/task.d/deb upgrade-and-install-pkgs -- xz-utils
COPY --from=task arm-gnu-toolchain /build/task.d/arm-gnu-toolchain
RUN --network=none task -d /build/task.d/arm-gnu-toolchain create-directory

Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu/24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN --network=none --mount=type=bind,from=dl-arm-gnu-toolchain,target=/build/dow
FROM task-base AS base
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
task -d /build/task.d/deb install-pkgs -- file build-essential ca-certificates jq dpkg-dev libsqlite3-dev libssl3
task -d /build/task.d/deb upgrade-and-install-pkgs -- file build-essential ca-certificates jq dpkg-dev libsqlite3-dev libssl3
RUN --network=none task -d /build create-build-directory && \
task -d /build/task.d/deb create-dotenv && \
task -d /build chown-build-directory -- nobody:nogroup
Expand Down

0 comments on commit 8adfb6c

Please sign in to comment.