mirror of
https://github.com/alexandrev/xslt-lab.git
synced 2026-09-21 04:43:16 +00:00
Expand Saxon extension functions
This commit is contained in:
+12
-1
@@ -2,7 +2,7 @@
|
||||
FROM golang:1.23-alpine AS builder
|
||||
|
||||
# Instalar dependencias necesarias
|
||||
RUN apk add --no-cache git
|
||||
RUN apk add --no-cache git openjdk17
|
||||
|
||||
# Establecer directorio de trabajo
|
||||
WORKDIR /app/src
|
||||
@@ -18,6 +18,14 @@ RUN go mod init xslt-playground && \
|
||||
go mod tidy && \
|
||||
go build -o server .
|
||||
|
||||
# Build extension functions jar
|
||||
WORKDIR /app/ext
|
||||
COPY ext/ .
|
||||
RUN javac com/xsltplayground/ext/CustomFunctions.java && \
|
||||
jar cf custom-functions.jar com/xsltplayground/ext/CustomFunctions.class
|
||||
|
||||
WORKDIR /app/src
|
||||
|
||||
# Etapa final (runtime)
|
||||
FROM alpine:latest
|
||||
|
||||
@@ -36,6 +44,9 @@ RUN mkdir -p /opt/saxon && \
|
||||
curl -L -o /opt/saxon/saxon-he.jar https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/11.6/Saxon-HE-11.6.jar && \
|
||||
curl -L -o /opt/saxon/xmlresolver.jar https://repo1.maven.org/maven2/org/xmlresolver/xmlresolver/4.5.0/xmlresolver-4.5.0.jar
|
||||
|
||||
# Extension functions jar
|
||||
COPY --from=builder /app/ext/custom-functions.jar /opt/saxon/
|
||||
|
||||
|
||||
# Exponer el puerto por defecto y ejecutar el binario
|
||||
EXPOSE 8000
|
||||
|
||||
Reference in New Issue
Block a user