Skip to content
Snippets Groups Projects
Commit b55719a0 authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos
Browse files

Added rules

parent 8b784e77
Branches master
No related tags found
No related merge requests found
......@@ -11,13 +11,14 @@ RUN curl -L -o /tmp/glassfish-4.1.zip http://download.java.net/glassfish
rm -f /tmp/glassfish-4.1.zip
WORKDIR /usr/local/glassfish4
COPY setup-glassfish.py /usr/local/glassfish4
RUN python /usr/local/glassfish4/setup-glassfish.py icat 2048m icat
############################################################
# COPYING DATABASE ADAPTERS
############################################################
COPY ./adapters/*jar /usr/local/glassfish4/glassfish/domains/icat/lib
COPY ./adapters/*jar /usr/local/glassfish4/glassfish/domains/icat/lib/
############################################################
# INSTALLING DB AUTHENTICATOR
......@@ -28,6 +29,6 @@ RUN wget https://repo.icatproject.org/repo/org/icatproject/authn.db/2.0.1/authn.
COPY authn.db-2.0.1/*properties /tmp/authn.db/
RUN ls /tmp
CMD /tmp/install.sh /tmp/authn.db && asadmin start-domain --verbose icat
CMD more /tmp/install.sh && /tmp/install.sh /tmp/authn.db && asadmin start-domain --verbose icat
EXPOSE 8080 4848 8181
\ No newline at end of file
version: "3.9"
services:
starter:
container_name: starter
build:
context: ./starter
links:
- icat
- database
depends_on:
- database
- icat
icat:
container_name: icat
build:
......@@ -24,8 +34,6 @@ services:
- 8089:8080
links:
- database
volumes:
- /users/demariaa/Software/workspaces/icat/icat-compose/auth-db/adapters:/tmp
depends_on:
- database
database:
......
......@@ -21,16 +21,17 @@ RUN python /usr/local/glassfish4/setup-glassfish.py icat 2048m icat
############################################################
COPY ./adapters/*jar /usr/local/glassfish4/glassfish/domains/icat/lib
############################################################
# INSTALLING DB AUTHENTICATOR
############################################################
COPY ./install.sh /tmp/install.sh
RUN wget https://repo.icatproject.org/repo/org/icatproject/icat.server/4.9.0/icat.server-4.9.0-distro.zip --directory-prefix=/tmp && cd /tmp && unzip /tmp/icat.server-4.9.0-distro.zip
ADD https://repo.icatproject.org/repo/org/icatproject/icat.server/4.9.0/icat.server-4.9.0-distro.zip /tmp
RUN cd /tmp && unzip /tmp/icat.server-4.9.0-distro.zip
COPY icat.server-4.9.0/*properties /tmp/icat.server
CMD sleep 15s && /tmp/install.sh /tmp/icat.server && asadmin start-domain --verbose icat
CMD sleep 15s && /tmp/install.sh /tmp/icat.server && cd /tmp/icat.server && asadmin start-domain --verbose icat
EXPOSE 8080 4848 8181
\ No newline at end of file
FROM frolvlad/alpine-python2
RUN apk add py3-pip mysql-client
RUN pip install suds-community python-icat
ADD https://repo.icatproject.org/repo/org/icatproject/icat.server/4.9.0/icat.server-4.9.0-distro.zip /tmp
RUN cd /tmp && unzip /tmp/icat.server-4.9.0-distro.zip
ADD rules.authz /tmp/icat.server
CMD mysql -u icat -picat -h database -D icat -e "insert into PASSWD (USERNAME, ENCODEDPASSWORD) VALUES ('root', 'icat')" && \
mysql -u icat -picat -h database -D icat -e "insert into PASSWD (USERNAME, ENCODEDPASSWORD) VALUES ('icat', 'icat')" && \
cd /tmp/icat.server && python rules.py load http://icat:8080 db username root password icat < rules.authz && tail -f /dev/null
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment