-
Notifications
You must be signed in to change notification settings - Fork 63
Add multi-arch Docker builds and fix arm/v7 plugin system compilation #34
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
Changes from all commits
469f2cb
d9ebd7f
bdb5f74
b03a2a4
c5714b7
eccbf19
4a186e4
c98bef5
70dba83
df89fa6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,42 @@ | ||||||
| name: Build and Publish Multi-Arch Docker Image | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| branches: [ main, development ] | ||||||
| pull_request: | ||||||
| branches: [ main, development ] | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
| jobs: | ||||||
| build: | ||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
| contents: read | ||||||
| packages: write | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Set up QEMU | ||||||
| uses: docker/setup-qemu-action@v3 | ||||||
|
|
||||||
| - name: Set up Docker Buildx | ||||||
| uses: docker/setup-buildx-action@v3 | ||||||
|
|
||||||
| - name: Login to GHCR | ||||||
| uses: docker/login-action@v3 | ||||||
| with: | ||||||
| registry: ghcr.io | ||||||
| username: ${{ secrets.GHCR_USERNAME }} | ||||||
| password: ${{ secrets.GHCR_TOKEN }} | ||||||
|
|
||||||
| - name: Build and Push Multi-Arch Image | ||||||
| uses: docker/build-push-action@v6 | ||||||
| with: | ||||||
| context: . | ||||||
| push: true | ||||||
|
||||||
| push: true | |
| push: ${{ github.event_name != 'pull_request' }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| .vscode/ | ||
| #.*/ | ||
| /venvs/ | ||
| .venv/ | ||
| __pycache__/ | ||
| .clinerules | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,24 @@ | ||
| # Dockerfile | ||
| FROM debian:bookworm-slim | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| RUN apt-get update && apt-get install -y \ | ||
| python3 python3-venv python3-pip bash \ | ||
| pkg-config \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| FROM debian:bookworm-slim | ||
|
|
||
| WORKDIR /workdir | ||
|
|
||
| # Copy source code | ||
| COPY . . | ||
| RUN mkdir -p /var/run/runtime | ||
|
|
||
| # Setup runtime directory and permissions | ||
| RUN mkdir -p /var/run/runtime && \ | ||
| chmod +x install.sh scripts/* start_openplc.sh | ||
|
|
||
| # Clean any existing build artifacts to ensure clean Docker build | ||
| RUN rm -rf build/ venvs/ 2>/dev/null || true | ||
| RUN chmod +x install.sh scripts/* start_openplc.sh | ||
| RUN rm -rf build/ venvs/ .venv/ 2>/dev/null || true | ||
|
||
|
|
||
| # Run installation script | ||
| RUN ./install.sh | ||
|
|
||
| # Expose webserver port | ||
| EXPOSE 8443 | ||
|
|
||
| # Default execution - Start OpenPLC Runtime | ||
| CMD ["bash", "./start_openplc.sh"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,6 +240,7 @@ def run_https(): | |
| ssl_context=context, | ||
| use_reloader=False, | ||
| log_output=False, | ||
| allow_unsafe_werkzeug=True, | ||
|
||
| ) | ||
|
|
||
| except FileNotFoundError: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For GitHub Container Registry authentication, use
${{ github.actor }}for username and${{ secrets.GITHUB_TOKEN }}for password instead of custom secrets. The built-inGITHUB_TOKENis automatically available and has appropriate permissions whenpackages: writeis set.