Skip to content

Commit

Permalink
added libraries and new docker image for alpine linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragos0000 committed Aug 11, 2024
1 parent f6feb9f commit 6ef1dcf
Show file tree
Hide file tree
Showing 16 changed files with 569 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.jar filter=lfs diff=lfs merge=lfs -text
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,5 @@ package.json
.limes/*
*.ser
.DS_Store
.scannerwork/*
.scannerwork/*
/infra/alpine/libraries/
3 changes: 2 additions & 1 deletion dags/pipelines/notice_processor_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def notice_transformation_pipeline(notice: Notice, mongodb_client: MongoClient)
message=f"This notice {notice.ted_id} is not eligible for transformation. Notice info: "
f"form_number=[{notice.normalised_metadata.form_number}],"
f" eform_subtype=[{notice.normalised_metadata.eforms_subtype}], "
f"xsd_version=[{notice.normalised_metadata.xsd_version}]. Check mapping suites!",
f"xsd_version=[{notice.normalised_metadata.xsd_version}], "
f"eform_sdk_version=[{notice.normalised_metadata.eform_sdk_version}]. Check mapping suites!",
notice_id=notice.ted_id, domain_action=notice_transformation_pipeline.__name__, notice_status=notice.status,
notice_form_number=notice.normalised_metadata.form_number,
notice_eforms_subtype=notice.normalised_metadata.eforms_subtype)
Expand Down
19 changes: 19 additions & 0 deletions infra/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Use the official Alpine Linux image
FROM alpine:3.20

# Update the package list and install sudo and shadow (which includes useradd)
RUN apk --no-cache add sudo=1.9.15_p5-r0 shadow=4.15.1-r0

# Create a new non-root user and set a home directory
RUN useradd -m newuser

RUN echo "newuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# Switch to the non-root user
USER newuser

# Set the working directory to the new user's home directory
WORKDIR /home/newuser
COPY libraries .
# Default command to execute when running the container
CMD ["/bin/sh"]
3 changes: 3 additions & 0 deletions libraries/.limes/limes.jar
Git LFS file not shown
3 changes: 3 additions & 0 deletions libraries/.rmlmapper/rmlmapper.jar
Git LFS file not shown
3 changes: 3 additions & 0 deletions libraries/.saxon/lib/jline-2.14.6.jar
Git LFS file not shown
3 changes: 3 additions & 0 deletions libraries/.saxon/lib/xml-resolver-1.2.jar
Git LFS file not shown
31 changes: 31 additions & 0 deletions libraries/.saxon/notices/JAMESCLARK.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

(This notice is included in the Saxon distribution because Saxon's XPath parser
was originally derived from an XPath parser written by James Clark and made available
under this license. The Saxon XPath parser has since diverged very substantially, but
there are traces of the original code still present.)

Copyright (c) 1998, 1999 James Clark

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL JAMES CLARK BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of James Clark shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from James Clark.
39 changes: 39 additions & 0 deletions libraries/.saxon/notices/JLINE2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
(This notice is included in the Saxon distribution because the JLine2
library is included, unmodified, in the Saxon distribution. It is used
to support interactive command line editing, autocompletion, and session
history by the Gizmo utility.)

Copyright (c) 2002-2016, the original author or authors.
All rights reserved.

http://www.opensource.org/licenses/bsd-license.php

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:

Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with
the distribution.

Neither the name of JLine nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 6ef1dcf

Please sign in to comment.