Skip to content

Instantly share code, notes, and snippets.

@leviathan747
Last active August 8, 2024 14:36
Show Gist options
  • Save leviathan747/7dacf709a780877c97e9a8a30f6ca8dd to your computer and use it in GitHub Desktop.
Save leviathan747/7dacf709a780877c97e9a8a30f6ca8dd to your computer and use it in GitHub Desktop.
xtuml2masl
BridgePoint/
antlr-3.5.2-runtime.jar
org.xtuml.bp.product-linux.gtk.x86_64.zip
# build stage
FROM ubuntu:24.04 AS build
# install dependencies
RUN apt-get update && apt-get install -y unzip=6.0-28ubuntu4 --no-install-recommends
# download BridgePoint
ADD https://xtuml-releases.s3.amazonaws.com/release-build/202403051449_v7.6.0/org.xtuml.bp.product-linux.gtk.x86_64.zip /bp.zip
# unzip the archive
RUN unzip /bp.zip
# install stage
FROM openjdk:21
# copy the necessary files
RUN mkdir -p /BridgePoint/tools/mc/bin /BridgePoint/tools/mc/schema /BridgePoint/plugins/org.xtuml.bp.x2m
ADD http://www.antlr3.org/download/antlr-3.5.2-runtime.jar /BridgePoint/tools/mc/bin
COPY --from=build /BridgePoint/tools/mc/bin/MASLParser.jar /BridgePoint/tools/mc/bin
COPY --from=build /BridgePoint/tools/mc/bin/xtuml2masl /BridgePoint/tools/mc/bin
COPY --from=build /BridgePoint/tools/mc/bin/x2m /BridgePoint/tools/mc/bin
COPY --from=build /BridgePoint/tools/mc/bin/masl /BridgePoint/tools/mc/bin
COPY --from=build /BridgePoint/plugins/org.xtuml.bp.x2m*/x2m.jar /BridgePoint/plugins/org.xtuml.bp.x2m
COPY --from=build /BridgePoint/tools/mc/schema/Globals.xtuml /BridgePoint/tools/mc/schema
# set the working directory
WORKDIR /root
# set the entry point
ENTRYPOINT ["/BridgePoint/tools/mc/bin/xtuml2masl"]
# install stage
FROM openjdk:21
# copy the necessary files
RUN mkdir -p /BridgePoint/tools/mc/bin /BridgePoint/tools/mc/schema /BridgePoint/plugins/org.xtuml.bp.x2m
COPY antlr-3.5.2-runtime.jar /BridgePoint/tools/mc/bin
COPY /BridgePoint/tools/mc/bin/MASLParser.jar /BridgePoint/tools/mc/bin
COPY /BridgePoint/tools/mc/bin/xtuml2masl /BridgePoint/tools/mc/bin
COPY /BridgePoint/tools/mc/bin/x2m /BridgePoint/tools/mc/bin
COPY /BridgePoint/tools/mc/bin/masl /BridgePoint/tools/mc/bin
COPY /BridgePoint/plugins/org.xtuml.bp.x2m*/x2m.jar /BridgePoint/plugins/org.xtuml.bp.x2m
COPY /BridgePoint/tools/mc/schema/Globals.xtuml /BridgePoint/tools/mc/schema
# set the working directory
WORKDIR /root
# set the entry point
ENTRYPOINT ["/BridgePoint/tools/mc/bin/xtuml2masl"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment