Skip to content

Commit 50259c5

Browse files
committed
Switch to botsudo/docker-rustpython
1 parent 7983340 commit 50259c5

File tree

3 files changed

+23
-47
lines changed

3 files changed

+23
-47
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1-
name: Build and test container
2-
on: [push]
1+
name: Build docker image
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- "*"
10+
tags-ignore:
11+
- "*"
312

413
jobs:
5-
build:
14+
build-image:
615
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
max-parallel: 4
19+
matrix:
20+
platform: ["linux/arm/v6", "linux/arm/v7", "linux/arm64/v8", "linux/386", "linux/ppc64le", "linux/amd64"]
721
steps:
822
- name: Checkout repository
923
uses: actions/checkout@v3
@@ -13,9 +27,8 @@ jobs:
1327
# https://github.com/docker/setup-buildx-action
1428
- name: Set up Docker Buildx
1529
uses: docker/setup-buildx-action@v2
16-
- name: Build image
30+
- name: Build docker image
1731
run: make docker-build
1832
env:
19-
DOCKER_BUILDKIT: 1
20-
- name: Test image
21-
run: make test
33+
DOCKER_BUILDKIT: 1
34+
PLATFORM: ${{ matrix.platform }}

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ docker-build:
1515
docker buildx build \
1616
--build-arg VCS_REF=`git rev-parse HEAD` \
1717
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
18-
--build-arg RUST_PYTHON_VERSION=`docker run -q --rm dclong/rustpython:alpine --version | cut -d ' ' -f 2` \
1918
--tag $(IMAGE_TAG) \
2019
--progress $(PROGRESS_MODE) \
2120
--platform $(PLATFORM) \

docker/Dockerfile

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ARG VERSION="1.2.6.5"
55
ARG DIST_URL="https://github.com/leenooks/phpLDAPadmin/archive/refs/tags/${VERSION}.tar.gz"
66
ARG BUILD_DATE
77
ARG VCS_REF
8-
ARG RUST_PYTHON_VERSION
98

109
# Set user and group
1110
ARG user=deploy
@@ -14,44 +13,8 @@ ARG group=deploy
1413
ENV CONTAINER_SERVICE_DIR="/container/service"
1514
ENV FIRST_START_DONE="/container/first-start-done"
1615

17-
COPY --from=dclong/rustpython:alpine /usr/local/bin/rustpython /usr/local/bin/rustpython
18-
19-
COPY <<-EOT /usr/local/share/sbom/rustpython.spdx.json
20-
{
21-
"spdxVersion": "SPDX-2.3",
22-
"dataLicense": "CC0-1.0",
23-
"SPDXID": "SPDXRef-DOCUMENT",
24-
"name": "docker-rustpython",
25-
"packages": [
26-
{
27-
"name": "rustpython",
28-
"SPDXID": "SPDXRef-Package-binary-rustpython-${RUST_PYTHON_VERSION}",
29-
"versionInfo": "${RUST_PYTHON_VERSION}",
30-
"downloadLocation": "https://hub.docker.com/r/dclong/rustpython",
31-
"sourceInfo": "copied from dclong/rustpython:alpine Docker image, source at: https://github.com/RustPython/RustPython",
32-
"licenseConcluded": "MIT",
33-
"licenseDeclared": "MIT",
34-
"copyrightText": "NOASSERTION",
35-
"description": "rustpython"
36-
}
37-
],
38-
"files": [
39-
{
40-
"SPDXID": "SPDXRef-rustpython-${RUST_PYTHON_VERSION}",
41-
"licenseConcluded": "MIT",
42-
"fileName": "/usr/local/bin/rustpython",
43-
"fileType": "BINARY"
44-
}
45-
],
46-
"relationships": [
47-
{
48-
"spdxElementId": "SPDXRef-Package-binary-rustpython-${RUST_PYTHON_VERSION}",
49-
"relationshipType": "CONTAINS",
50-
"relatedSpdxElement": "SPDXRef-rustpython-${RUST_PYTHON_VERSION}"
51-
}
52-
]
53-
}
54-
EOT
16+
COPY --from=botsudo/docker-rustpython:latest /usr/local/bin/rustpython /usr/local/bin/rustpython
17+
COPY --from=botsudo/docker-rustpython:latest /usr/local/share/sbom/rustpython.spdx.json /usr/local/share/sbom/rustpython.spdx.json
5518

5619
RUN apk add --no-cache --update nginx curl bash musl \
5720
openssl libgcc \
@@ -150,6 +113,7 @@ LABEL org.label-schema.vendor="Sudo-Bot" \
150113
com.docker.extension.publisher-url="https://github.com/sudo-bot" \
151114
\
152115
org.opencontainers.image.title="Docker phpLDAPadmin server" \
116+
org.opencontainers.image.description="A phpLDAPadmin image" \
153117
org.opencontainers.image.authors="williamdes@wdes.fr" \
154118
org.opencontainers.image.url="https://github.com/sudo-bot/docker-phpldapadmin#readme" \
155119
org.opencontainers.image.documentation="https://github.com/sudo-bot/docker-phpldapadmin#readme" \

0 commit comments

Comments
 (0)