feat(docker): docker building added

!1
This commit is contained in:
2023-08-11 00:20:46 +09:30
parent cb934145a6
commit 36de8c58a1
2 changed files with 46 additions and 1 deletions

View File

@ -2,7 +2,10 @@ variables:
MY_PROJECT_ID: "48321671"
GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/nodered_ldap_self_service.git"
DOCKER_IMAGE_BUILD_TARGET_PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7"
DOCKER_IMAGE_PUBLISH_NAME: 'ldap-selfservice'
DOCKER_IMAGE_PUBLISH_REGISTRY: docker.io/nofusscomputing
DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME
PAGES_ENVIRONMENT_PATH: projects/ldap_self_service/
include:

42
dockerfile Normal file
View File

@ -0,0 +1,42 @@
FROM --platform=$TARGETPLATFORM python:3.11-bullseye as CloneRepo
RUN export DEBIAN_FRONTEND=noninteractive \
&& dpkg-reconfigure debconf -f noninteractive
RUN apt update \
&& apt install -yq \
git
RUN git clone --depth=1 -b genesis https://gitlab.com/nofusscomputing/projects/nodered_ldap_self_service.git /tmp/self_service ; ls -l /tmp/self_service
FROM --platform=$TARGETPLATFORM nodered/node-red:3.0.2-18
LABEL \
# org.opencontainers.image.authors="{contributor url}" \
org.opencontainers.image.vendor="No Fuss Computing" \
# org.opencontainers.image.url="{dockerhub url}" \
# org.opencontainers.image.documentation="{docs url}" \
# org.opencontainers.image.source="{repo url}" \
# org.opencontainers.image.revision="{git commit sha at time of build}" \
org.opencontainers.image.title="No Fuss Computings LDAP Self Service" \
org.opencontainers.image.description="A NodeRED App for LDAP Self Service" \
org.opencontainers.image.vendor="No Fuss Computing"
# org.opencontainers.image.version="{git tag}"
USER root
COPY --from=CloneRepo /tmp/self_service/* /data/
COPY includes/ /
RUN chown node-red:node-red -R /data; \
chown node-red:node-red -R /usr/src/node-red;
USER node-red
RUN cd /data; \
npm install package.json
VOLUME [ "/data", "/usr/src/node-red" ]