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

fix[closes #50]: Use apt-get instead of apt and fix go build #55

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

lambdaclan
Copy link
Contributor

Use apt-get instead of apt and fix go build

Closes #50

Related to: 60a7d88#r143184779

Description

  1. 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.
    
  2. go build fails due to inconsistent package name

This PR updates the apt core package to use apt-get * command variants for all apt commands (install and clean) and fixes the incorrect package name so that the application can be successfully built.

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

@kbdharun
Copy link
Member

LGTM, thanks for your contribution.


Tested the changes locally, this PR is GTG.

@kbdharun kbdharun merged commit eeee0f6 into Vanilla-OS:main Jun 18, 2024
1 check passed
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
2 participants