Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat[closes #50]: Use apt-get instead of apt #51

Merged
merged 1 commit into from
May 20, 2024

Conversation

lambdaclan
Copy link
Contributor

@lambdaclan lambdaclan commented May 20, 2024

Use apt-get instead of apt

Closes #50

Description

apt is the recommended command for interactive use by administrators, not for use in shell scripts. Furthermore, the current use of apt is causing CLI warnings:

apt does not have a stable CLI interface. Use with caution in scripts.

This PR updates the apt core package to use apt-get * command variants for all apt commands (install and clean)

Proposed Changes

Local Testing

Using the following vib.yml recipe:

name: my-recipe
id: my-test
stages:
  - id: build
    base: debian:sid-slim
    labels:
      maintainer: My Awesome Team
    args:
      DEBIAN_FRONTEND: noninteractive
    runs:
      - echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/01norecommends
    modules:
      - name: update
        type: shell
        commands:
          - apt-get update
      - name: example-packages # Sample module using the built-in Apt module to install packages
        type: apt
        source:
          packages:
            - vim
vib build vim.yml

image

Generated Containerfile:

# Stage: build
FROM debian:sid-slim AS build
LABEL maintainer='My Awesome Team'
ARG DEBIAN_FRONTEND=noninteractive
RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/01norecommends
ADD includes.container /
ADD sources /sources
RUN apt-get update
RUN apt-get install -y  vim  && apt-get clean

@axtloss axtloss merged commit e1831a6 into Vanilla-OS:main May 20, 2024
2 checks passed
@mks-h
Copy link
Member

mks-h commented May 20, 2024

Thanks for the contribution! Feel free to join our Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use apt-get instead of apt
3 participants