Merge pull request #1167 from tobiasge/unit-ubuntu-update
Unit and Ubuntu update
This commit is contained in:
commit
8e278c3c8e
21
.github/workflows/push.yml
vendored
21
.github/workflows/push.yml
vendored
@ -49,35 +49,36 @@ jobs:
|
|||||||
- PRERELEASE=true ./build-latest.sh
|
- PRERELEASE=true ./build-latest.sh
|
||||||
- ./build.sh feature
|
- ./build.sh feature
|
||||||
- ./build.sh develop
|
- ./build.sh develop
|
||||||
platform:
|
os:
|
||||||
- linux/amd64
|
- ubuntu-latest
|
||||||
- linux/arm64
|
- self-hosted
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
env:
|
env:
|
||||||
GH_ACTION: enable
|
GH_ACTION: enable
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
IMAGE_NAMES: docker.io/netboxcommunity/netbox
|
IMAGE_NAMES: docker.io/netboxcommunity/netbox
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
name: Builds new NetBox Docker Images
|
name: Builds new NetBox Docker Images
|
||||||
steps:
|
steps:
|
||||||
- id: git-checkout
|
- id: git-checkout
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- id: qemu-setup
|
|
||||||
name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
- id: buildx-setup
|
- id: buildx-setup
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- id: arm-buildx-platform
|
||||||
|
name: Set BUILDX_PLATFORM to ARM64
|
||||||
|
if: matrix.os == 'self-hosted'
|
||||||
|
run: |
|
||||||
|
echo "BUILDX_PLATFORM=linux/arm64" >>"${GITHUB_ENV}"
|
||||||
- id: docker-build
|
- id: docker-build
|
||||||
name: Build the image for '${{ matrix.platform }}' with '${{ matrix.build_cmd }}'
|
name: Build the image for '${{ matrix.os }}' with '${{ matrix.build_cmd }}'
|
||||||
run: ${{ matrix.build_cmd }}
|
run: ${{ matrix.build_cmd }}
|
||||||
env:
|
env:
|
||||||
BUILDX_PLATFORM: ${{ matrix.platform }}
|
|
||||||
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }}
|
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }}
|
||||||
- id: arm-time-limit
|
- id: arm-time-limit
|
||||||
name: Set Netbox container start_period higher on ARM64
|
name: Set Netbox container start_period higher on ARM64
|
||||||
if: matrix.platform == 'linux/arm64'
|
if: matrix.os == 'self-hosted'
|
||||||
run: |
|
run: |
|
||||||
echo "NETBOX_START_PERIOD=240s" >>"${GITHUB_ENV}"
|
echo "NETBOX_START_PERIOD=240s" >>"${GITHUB_ENV}"
|
||||||
- id: docker-test
|
- id: docker-test
|
||||||
|
@ -69,13 +69,13 @@ RUN export DEBIAN_FRONTEND=noninteractive \
|
|||||||
tini \
|
tini \
|
||||||
&& curl --silent --output /usr/share/keyrings/nginx-keyring.gpg \
|
&& curl --silent --output /usr/share/keyrings/nginx-keyring.gpg \
|
||||||
https://unit.nginx.org/keys/nginx-keyring.gpg \
|
https://unit.nginx.org/keys/nginx-keyring.gpg \
|
||||||
&& echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ lunar unit" \
|
&& echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ mantic unit" \
|
||||||
> /etc/apt/sources.list.d/unit.list \
|
> /etc/apt/sources.list.d/unit.list \
|
||||||
&& apt-get update -qq \
|
&& apt-get update -qq \
|
||||||
&& apt-get install \
|
&& apt-get install \
|
||||||
--yes -qq --no-install-recommends \
|
--yes -qq --no-install-recommends \
|
||||||
unit=1.31.1-1~lunar \
|
unit=1.32.0-1~mantic \
|
||||||
unit-python3.11=1.31.1-1~lunar \
|
unit-python3.11=1.32.0-1~mantic \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder /opt/netbox/venv /opt/netbox/venv
|
COPY --from=builder /opt/netbox/venv /opt/netbox/venv
|
||||||
|
4
build.sh
4
build.sh
@ -61,7 +61,7 @@ DOCKERFILE The name of Dockerfile to use.
|
|||||||
${_GREEN}Default:${_CLEAR} Dockerfile
|
${_GREEN}Default:${_CLEAR} Dockerfile
|
||||||
|
|
||||||
DOCKER_FROM The base image to use.
|
DOCKER_FROM The base image to use.
|
||||||
${_GREEN}Default:${_CLEAR} 'ubuntu:23.04'
|
${_GREEN}Default:${_CLEAR} 'ubuntu:23.10'
|
||||||
|
|
||||||
BUILDX_PLATFORMS
|
BUILDX_PLATFORMS
|
||||||
Specifies the platform(s) to build the image for.
|
Specifies the platform(s) to build the image for.
|
||||||
@ -219,7 +219,7 @@ fi
|
|||||||
# Determining the value for DOCKER_FROM
|
# Determining the value for DOCKER_FROM
|
||||||
###
|
###
|
||||||
if [ -z "$DOCKER_FROM" ]; then
|
if [ -z "$DOCKER_FROM" ]; then
|
||||||
DOCKER_FROM="docker.io/ubuntu:23.04"
|
DOCKER_FROM="docker.io/ubuntu:23.10"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user