Skip to content

Commit b4e1b7b

Browse files
committed
add debug image publishing
1 parent 717591a commit b4e1b7b

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.github/workflows/_container.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,25 @@ jobs:
6262
push: true
6363
tags: ${{ steps.meta.outputs.tags }}
6464
labels: ${{ steps.meta.outputs.labels }}
65+
66+
- name: Create tags for publishing debug image
67+
id: meta-debug
68+
uses: docker/metadata-action@v5
69+
with:
70+
images: ghcr.io/${{ github.repository }}-debug
71+
tags: |
72+
type=ref,event=tag
73+
type=raw,value=latest
74+
- name: Push cached debug image to container registry
75+
if: inputs.publish && github.ref_type == 'tag'
76+
uses: docker/build-push-action@v6
77+
env:
78+
DOCKER_BUILD_RECORD_UPLOAD: false
79+
# This does not build the image again, it will find the image in the
80+
# Docker cache and publish it
81+
with:
82+
context: .
83+
push: true
84+
target: developer
85+
tags: ${{ steps.meta-debug.outputs.tags }}
86+
labels: ${{ steps.meta-debug.outputs.labels }}

.vscode/launch.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
},
1515
"pathMappings": [
1616
{
17-
"localRoot": "${workspaceFolder}",
18-
"remoteRoot": "/venv/lib/python3.13/site-packages/stdio_socket"
17+
"localRoot": "${workspaceFolder}/src/fastcs_example",
18+
"remoteRoot": "/venv/lib/python3.11/site-packages/fastcs_example/"
1919
}
20-
]
20+
],
21+
"justMyCode": false
2122
},
2223
{
2324
"name": "Debug Unit Test",

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ FROM python:${PYTHON_VERSION} AS developer
66
# Add any system dependencies for the developer/build environment here
77
RUN apt-get update && apt-get install -y --no-install-recommends \
88
gdb \
9+
busybox \
910
graphviz \
1011
&& rm -rf /var/lib/apt/lists/*
1112

13+
# Use busybox to provide any missing commands
14+
# This is useful for commands like `telnet` that are not available in the base image
15+
RUN busybox --install -s
16+
1217
# Set up a virtual environment and put it in PATH
1318
RUN python -m venv /venv
1419
ENV PATH=/venv/bin:$PATH

0 commit comments

Comments
 (0)