Skip to content

Commit

Permalink
mod-lauth_0.0.0_amd64.deb
Browse files Browse the repository at this point in the history
  • Loading branch information
gkostin1966 committed Apr 16, 2024
1 parent 0643269 commit da3f189
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ apache/client/subprojects/*
!apache/client/subprojects/*.wrap

apache/client/build/

# Debian Packages
apache/packages
!apache/packages/.keep
8 changes: 8 additions & 0 deletions apache/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Package: mod-lauth
Version: 0.0.0
Architecture: amd64
Essential: no
Priority: optional
Depends: http
Maintainer: University of Michigan Library Information Technology
Description: Library Authentication/Authorization Module for Apache HTTP Server
3 changes: 3 additions & 0 deletions apache/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

# Post-Installation Script
3 changes: 3 additions & 0 deletions apache/DEBIAN/preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

# Pre-Installation Script
22 changes: 22 additions & 0 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,25 @@ COPY --from=module /usr/lib/apache2/modules/mod_lauth.so /usr/local/apache2/modu

COPY ./test-site /lauth/test-site/
COPY ./apache/conf/* /usr/local/apache2/conf/

###
FROM build-base AS package

ARG PACKAGE_VERSION=0.0.0
ENV PACKAGE_DIR=mod-lauth_${PACKAGE_VERSION}_amd64

RUN mkdir -p /lauth/apache/debpkgs/${PACKAGE_DIR}
COPY ./apache/DEBIAN /lauth/apache/debpkgs/${PACKAGE_DIR}/DEBIAN

COPY --from=module /usr/local/ /lauth/apache/debpkgs/${PACKAGE_DIR}/usr/local/
COPY --from=module /lauth/apache/build/http-check /lauth/apache/debpkgs/${PACKAGE_DIR}/usr/local/bin/

RUN mkdir -p /lauth/apache/debpkgs/${PACKAGE_DIR}/usr/lib/apache2/modules
COPY --from=module /usr/lib/apache2/modules/mod_authn_remoteuser.so /lauth/apache/debpkgs/${PACKAGE_DIR}/usr/local/apache2/modules/
COPY --from=module /usr/lib/apache2/modules/mod_lauth.so /lauth/apache/debpkgs/${PACKAGE_DIR}/usr/local/apache2/modules/

WORKDIR /lauth/apache/debpkgs
RUN dpkg --build ${PACKAGE_DIR}

COPY ./apache/packages /lauth/apache/packages
CMD ["sleep", "infinity"]
Empty file added apache/packages/.keep
Empty file.
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ services:
- ./apache/module:/lauth/apache/module
- build_cache:/lauth/apache/build

package:
profiles: [ "package" ]
build:
context: ./
dockerfile: ./apache/Dockerfile
target: package
restart: "no"
volumes:
- ./apache/packages:/lauth/apache/packages
command: ["sh", "-c", "cp *.deb /lauth/apache/packages"]

mock-api:
profiles: [ "test", "integration" ]
build:
Expand Down

0 comments on commit da3f189

Please sign in to comment.