Skip to content

Commit c3ff8d3

Browse files
Dockerfile: Create dockerfile and check it out
Signed-off-by: Simon Beaudoin <[email protected]>
1 parent d120c84 commit c3ff8d3

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/qcom-container-build-and-upload.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,18 @@ jobs:
2626

2727
steps:
2828

29+
- name: Checkout Dockerfile
30+
uses: actions/checkout@v4
31+
with:
32+
ref: ${{github.head_ref}}
33+
sparse-checkout: docker/Dockerfile
34+
sparse-checkout-cone-mode: false # <- Set to off for single file
35+
2936
- name: Authenticate to GHCR
3037
run: echo ${{ secrets.DEB_PKG_BOT_CI_TOKEN }} | docker login ghcr.io -u ${{ vars.DEB_PKG_BOT_CI_USERNAME }} --password-stdin
3138

39+
- name: tree
40+
run: tree
41+
3242
- name: Build and Tag the Image
33-
run: docker build -t ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:latest .
43+
run: docker build -t ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:latest ./docker

docker/Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Use an official Ubuntu base image
3+
FROM ubuntu:22.04
4+
5+
# Prevent interactive prompts during package installation
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
8+
# Update package list and install dependencies
9+
RUN apt-get update && apt-get install -y \
10+
curl \
11+
git \
12+
git-buildpackage \
13+
sbuild \
14+
debootstrap \
15+
tree \
16+
build-essential \
17+
&& apt-get clean \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
# gh
21+
22+
# Set working directory
23+
WORKDIR /app
24+
25+
# Optional: copy your project files
26+
# COPY . .
27+
28+
# Default command
29+
CMD [ "bash" ]

docker/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This Dockerfile is the docker container used for package building in all the pkg- workflows.
2+
When this dockerfile is updated, one needs to in the Actions tab in the repo and trigger the
3+
"Container Build And Upload" action in order to build and upload this docker image to GHCR

0 commit comments

Comments
 (0)