mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-12-16 00:16:18 +00:00
feat: add custom armv7 compared to amd64 and arm64 (#1007)
* feat: add separate arm/v7 building with c version * chore: change workflow step names * fix: my stupid path mistake * chore: retry sed * chore: temp comment out * chore: add libraries and choose for C on arm7 * chore: add arm64 and amd64 back * chore: streamline workflow * chore: work on the workflow * chore: try to separate matrix * revert to old method with changes * chore: remove invalid reference * chore: correct deps * chore: remove old steps * feat: add custom armv7 images (compared to arm64 and amd64) * chore: minor add go version in workflow --------- Co-authored-by: DaanSelen <dselen@systemec.nl>
This commit is contained in:
12
.github/workflows/docker.yml
vendored
12
.github/workflows/docker.yml
vendored
@@ -44,15 +44,12 @@ jobs:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: |
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
# - linux/arm/v7
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Docker meta by docs https://github.com/docker/metadata-action
|
||||
- name: Extract Docker metadata from environment
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
@@ -64,7 +61,7 @@ jobs:
|
||||
type=ref,event=tag
|
||||
type=sha,format=short,prefix=
|
||||
|
||||
- name: Build and export (multi-arch)
|
||||
- name: Build and export Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
@@ -72,8 +69,7 @@ jobs:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
#,linux/arm/v7
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
|
||||
docker_scan:
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
*.tar
|
||||
.vscode
|
||||
.DS_Store
|
||||
.idea
|
||||
|
||||
@@ -22,7 +22,8 @@ ENV CGO_ENABLED=1
|
||||
# Change directory
|
||||
WORKDIR /workspace/awg
|
||||
# Compile the binaries
|
||||
RUN go mod download && \
|
||||
RUN go version && \
|
||||
go mod download && \
|
||||
go mod verify && \
|
||||
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
|
||||
#
|
||||
@@ -56,12 +57,16 @@ RUN make && chmod +x wg*
|
||||
# Use the python-alpine image for building pip dependencies
|
||||
FROM python:3.14-alpine AS pip-builder
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
# Add the build dependencies and create a Python virtual environment.
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
pkgconfig \
|
||||
python3-dev \
|
||||
postgresql-dev \
|
||||
libffi-dev \
|
||||
libpq \
|
||||
linux-headers \
|
||||
rust \
|
||||
cargo \
|
||||
@@ -70,6 +75,11 @@ RUN apk add --no-cache \
|
||||
|
||||
# Copy the requirements file into the build layer.
|
||||
COPY ./src/requirements.txt /opt/wgdashboard/src
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||
sed -i "s|psycopg\[binary\]==3.2.13|psycopg\[c\]==3.2.13|" /opt/wgdashboard/src/requirements.txt; \
|
||||
fi; \
|
||||
cat /opt/wgdashboard/src/requirements.txt
|
||||
|
||||
# Install the pip packages
|
||||
RUN . /opt/wgdashboard/src/venv/bin/activate && \
|
||||
pip3 install --upgrade pip && \
|
||||
@@ -133,7 +143,7 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
# Copy in the runtime script, essential.
|
||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
|
||||
#
|
||||
# Expose ports on the container
|
||||
EXPOSE 10086
|
||||
WORKDIR $WGDASH/src
|
||||
|
||||
|
||||
Reference in New Issue
Block a user