First version of vagrant-vbox container
All checks were successful
Build & publish images / build-and-push-image (git.plantroon.com/plantroon/vagrant-vbox, 6.1.44) (push) Successful in 1m0s
Build & publish images / build-and-push-image (git.plantroon.com/plantroon/vagrant-vbox, 7.0.6) (push) Successful in 2m48s
Build & publish images / build-and-push-image (git.plantroon.com/plantroon/vagrant-vbox, 7.0.8) (push) Successful in 2m42s

This commit is contained in:
Jakub Filo 2023-06-06 08:23:31 +00:00
parent efeaf81c79
commit dc3a937969
Signed by: plantroon
GPG Key ID: 7DA8C0FFEED0C0DE
2 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,55 @@
name: Build & publish images
on: [push]
env:
REGISTRY: git.plantroon.com
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
strategy:
fail-fast: false
matrix:
include:
- image: git.plantroon.com/plantroon/vagrant-vbox
version: 7.0.8
- image: git.plantroon.com/plantroon/vagrant-vbox
version: 7.0.6
- image: git.plantroon.com/plantroon/vagrant-vbox
version: 6.1.44
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Extract Docker metadata
id: meta
uses: https://github.com/docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: plantroon/vbox
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
push: true
tags: ${{ matrix.image}}:${{ matrix.version }}
labels: ${{ steps.meta.outputs.labels }}
build-args: VERSION=${{ matrix.version }}

28
Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM debian:bullseye
ARG VERSION
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
fasttrack-archive-keyring software-properties-common curl gpg \
&& curl -fsSL "https://www.virtualbox.org/download/oracle_vbox_2016.asc" \
| gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox_2016.gpg \
&& curl -fsSL "https://www.virtualbox.org/download/oracle_vbox.asc" \
| gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox.gpg \
&& apt-add-repository "deb http://deb.debian.org/debian bullseye-backports main contrib" \
&& apt-add-repository "deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-fasttrack main contrib" \
&& apt-add-repository "deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-backports-staging main contrib" \
&& apt-add-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bullseye contrib" \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
virtualbox-$(echo "$VERSION" | cut -d. -f-2) vagrant procps kmod \
&& mkdir -p /etc/vbox \
&& echo "* 0.0.0.0/0 ::/0" > /etc/vbox/networks.conf \
&& apt-get clean \
&& curl -fsSLOJ "https://download.virtualbox.org/virtualbox/$VERSION/Oracle_VM_VirtualBox_Extension_Pack-$VERSION.vbox-extpack" \
&& echo y | VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack \
&& rm -f Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack \
&& rm -Rf /var/lib/apt/lists/* \
&& rm -Rf /usr/share/doc \
&& rm -Rf /usr/share/man
ENTRYPOINT ["vboxmanage"]