From bc8d8ca6cc364d00cc4be3f8867530d9592288e2 Mon Sep 17 00:00:00 2001 From: ION606 Date: Sun, 1 Sep 2024 15:10:56 -0400 Subject: [PATCH 1/6] added salsa --- dockerfiles/salsa/1.1.6/Dockerfile | 19 +++++++++++++++++++ dockerfiles/salsa/metadata.json | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 dockerfiles/salsa/1.1.6/Dockerfile create mode 100644 dockerfiles/salsa/metadata.json diff --git a/dockerfiles/salsa/1.1.6/Dockerfile b/dockerfiles/salsa/1.1.6/Dockerfile new file mode 100644 index 0000000..1d534b4 --- /dev/null +++ b/dockerfiles/salsa/1.1.6/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:22.04 + +# Install necessary packages (Java and curl) +RUN apt-get update \ + && apt-get install -y openjdk-17-jdk curl --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /usr/src/app + +RUN mkdir -p /usr/local/lib/salsa + +# Download the Salsa compiler jar file +RUN curl -SL -o /usr/local/lib/salsa/salsa1.1.6.jar http://wcl.cs.rpi.edu/salsa/releases/salsa1.1.6.jar + +# Set environment variable for the Salsa compiler jar location +ENV SALSA_COMPILER_JAR=/usr/local/lib/salsa/salsa1.1.6.jar + +# start the container from bash +CMD ["/bin/bash"] diff --git a/dockerfiles/salsa/metadata.json b/dockerfiles/salsa/metadata.json new file mode 100644 index 0000000..99c1ffc --- /dev/null +++ b/dockerfiles/salsa/metadata.json @@ -0,0 +1,3 @@ +{ + "pushLatest": false +} From 42d13ba831f6d8f1379096909503959f4992a946 Mon Sep 17 00:00:00 2001 From: ION606 Date: Thu, 5 Sep 2024 16:24:53 -0400 Subject: [PATCH 2/6] stash --- dockerfiles/salsa/1.1.6/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dockerfiles/salsa/1.1.6/Dockerfile b/dockerfiles/salsa/1.1.6/Dockerfile index 1d534b4..cd959d1 100644 --- a/dockerfiles/salsa/1.1.6/Dockerfile +++ b/dockerfiles/salsa/1.1.6/Dockerfile @@ -1,5 +1,7 @@ FROM ubuntu:22.04 +# DO NOT EXPOSE ANY PORTS IN THIS FILE + # Install necessary packages (Java and curl) RUN apt-get update \ && apt-get install -y openjdk-17-jdk curl --no-install-recommends \ @@ -14,6 +16,22 @@ RUN curl -SL -o /usr/local/lib/salsa/salsa1.1.6.jar http://wcl.cs.rpi.edu/salsa/ # Set environment variable for the Salsa compiler jar location ENV SALSA_COMPILER_JAR=/usr/local/lib/salsa/salsa1.1.6.jar +ENV SALSAOPTS="" + +# Create aliases +# RUN echo "java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler \!*.salsa; javac -classpath $SALSA_COMPILER_JAR:. \!*.java" > 'salsac' +# RUN echo "java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS" > 'salsa' +# RUN echo "java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer" > 'wwcns' +# RUN echo "java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater" > 'wwctheater' +# RUN chmod +x salsac && chmod +x salsa && chmod +x wwcns && chmod +x wwctheater + +RUN echo "alias salsac='java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler \!*.salsa; javac -classpath $SALSA_COMPILER_JAR:. \!*.java'\n\ + alias salsa='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS' \n\ + alias wwcns='java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer' \n\ + alias wwctheater='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater'" \ + > /usr/src/app/.bashrc + +RUN source /usr/src/app/.bashrc # start the container from bash CMD ["/bin/bash"] From 28000c5f2a6aa9d77dc49b41825819611d727466 Mon Sep 17 00:00:00 2001 From: ION606 Date: Thu, 5 Sep 2024 17:32:28 -0400 Subject: [PATCH 3/6] temp --- dockerfiles/salsa/1.1.6/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dockerfiles/salsa/1.1.6/Dockerfile b/dockerfiles/salsa/1.1.6/Dockerfile index cd959d1..075c343 100644 --- a/dockerfiles/salsa/1.1.6/Dockerfile +++ b/dockerfiles/salsa/1.1.6/Dockerfile @@ -25,13 +25,14 @@ ENV SALSAOPTS="" # RUN echo "java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater" > 'wwctheater' # RUN chmod +x salsac && chmod +x salsa && chmod +x wwcns && chmod +x wwctheater -RUN echo "alias salsac='java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler \!*.salsa; javac -classpath $SALSA_COMPILER_JAR:. \!*.java'\n\ - alias salsa='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS' \n\ - alias wwcns='java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer' \n\ - alias wwctheater='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater'" \ +RUN echo "alias salsac=\"java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler \!*.salsa; javac -classpath $SALSA_COMPILER_JAR:. \!*.java\"\n\ + alias salsa=\"java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS\" \n\ + alias wwcns=\"java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer\" \n\ + alias wwctheater=\"java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater\"" \ > /usr/src/app/.bashrc RUN source /usr/src/app/.bashrc # start the container from bash -CMD ["/bin/bash"] +CMD ["/bin/bash", "-c", "source /usr/src/app/.bashrc && exec /bin/bash"] + From f3e27a99ab5af9e29c42904095022091137d5f47 Mon Sep 17 00:00:00 2001 From: ION606 Date: Wed, 11 Sep 2024 12:13:27 -0400 Subject: [PATCH 4/6] bug fixes --- dockerfiles/salsa/1.1.6/Dockerfile | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/dockerfiles/salsa/1.1.6/Dockerfile b/dockerfiles/salsa/1.1.6/Dockerfile index 075c343..58499b2 100644 --- a/dockerfiles/salsa/1.1.6/Dockerfile +++ b/dockerfiles/salsa/1.1.6/Dockerfile @@ -18,21 +18,14 @@ RUN curl -SL -o /usr/local/lib/salsa/salsa1.1.6.jar http://wcl.cs.rpi.edu/salsa/ ENV SALSA_COMPILER_JAR=/usr/local/lib/salsa/salsa1.1.6.jar ENV SALSAOPTS="" -# Create aliases -# RUN echo "java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler \!*.salsa; javac -classpath $SALSA_COMPILER_JAR:. \!*.java" > 'salsac' -# RUN echo "java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS" > 'salsa' -# RUN echo "java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer" > 'wwcns' -# RUN echo "java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater" > 'wwctheater' -# RUN chmod +x salsac && chmod +x salsa && chmod +x wwcns && chmod +x wwctheater +# Write aliases to a separate file +RUN echo "alias salsac='java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler !*.salsa; javac -classpath $SALSA_COMPILER_JAR:. !*.java'" >> /usr/src/app/salsa_aliases.sh && \ + echo "alias salsa='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS'" >> /usr/src/app/salsa_aliases.sh && \ + echo "alias wwcns='java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer'" >> /usr/src/app/salsa_aliases.sh && \ + echo "alias wwctheater='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater'" >> /usr/src/app/salsa_aliases.sh -RUN echo "alias salsac=\"java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler \!*.salsa; javac -classpath $SALSA_COMPILER_JAR:. \!*.java\"\n\ - alias salsa=\"java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS\" \n\ - alias wwcns=\"java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer\" \n\ - alias wwctheater=\"java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater\"" \ - > /usr/src/app/.bashrc - -RUN source /usr/src/app/.bashrc - -# start the container from bash -CMD ["/bin/bash", "-c", "source /usr/src/app/.bashrc && exec /bin/bash"] +# make sure the aliases script gets sourced on container start +RUN echo "source /usr/src/app/salsa_aliases.sh" >> /etc/bash.bashrc +# Start the container in bash +CMD ["bash"] \ No newline at end of file From f4c33062fca454918cef071aa20ec4e4a070de4c Mon Sep 17 00:00:00 2001 From: ION606 Date: Wed, 11 Sep 2024 12:46:34 -0400 Subject: [PATCH 5/6] salsa fixes (incorrect compile command) --- dockerfiles/salsa/1.1.6/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dockerfiles/salsa/1.1.6/Dockerfile b/dockerfiles/salsa/1.1.6/Dockerfile index 58499b2..00a8fd2 100644 --- a/dockerfiles/salsa/1.1.6/Dockerfile +++ b/dockerfiles/salsa/1.1.6/Dockerfile @@ -19,7 +19,7 @@ ENV SALSA_COMPILER_JAR=/usr/local/lib/salsa/salsa1.1.6.jar ENV SALSAOPTS="" # Write aliases to a separate file -RUN echo "alias salsac='java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler !*.salsa; javac -classpath $SALSA_COMPILER_JAR:. !*.java'" >> /usr/src/app/salsa_aliases.sh && \ +RUN echo "alias salsac='java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler *.salsa; javac -classpath $SALSA_COMPILER_JAR:. *.java'" >> /usr/src/app/salsa_aliases.sh && \ echo "alias salsa='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS'" >> /usr/src/app/salsa_aliases.sh && \ echo "alias wwcns='java -cp $SALSA_COMPILER_JAR:. wwc.naming.WWCNamingServer'" >> /usr/src/app/salsa_aliases.sh && \ echo "alias wwctheater='java -cp $SALSA_COMPILER_JAR:. $SALSAOPTS wwc.messaging.Theater'" >> /usr/src/app/salsa_aliases.sh @@ -27,5 +27,4 @@ RUN echo "alias salsac='java -cp $SALSA_COMPILER_JAR:. salsac.SalsaCompiler !*.s # make sure the aliases script gets sourced on container start RUN echo "source /usr/src/app/salsa_aliases.sh" >> /etc/bash.bashrc -# Start the container in bash CMD ["bash"] \ No newline at end of file From 19712b5501dea972267724cbe608cfbf68068d23 Mon Sep 17 00:00:00 2001 From: ION606 Date: Tue, 24 Sep 2024 21:27:54 -0400 Subject: [PATCH 6/6] added checksum check --- dockerfiles/salsa/1.1.6/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dockerfiles/salsa/1.1.6/Dockerfile b/dockerfiles/salsa/1.1.6/Dockerfile index 00a8fd2..74d911f 100644 --- a/dockerfiles/salsa/1.1.6/Dockerfile +++ b/dockerfiles/salsa/1.1.6/Dockerfile @@ -10,9 +10,13 @@ RUN apt-get update \ WORKDIR /usr/src/app RUN mkdir -p /usr/local/lib/salsa +ENV SALSA_JAR_SHA256=821fe5ec2922ff32f09fa55280afd023aa9852c7cc074f90cd086a4691e327af # Download the Salsa compiler jar file -RUN curl -SL -o /usr/local/lib/salsa/salsa1.1.6.jar http://wcl.cs.rpi.edu/salsa/releases/salsa1.1.6.jar +RUN curl -SL -o /usr/local/lib/salsa/salsa1.1.6.jar http://wcl.cs.rpi.edu/salsa/releases/salsa1.1.6.jar \ + && echo "$SALSA_JAR_SHA256 /usr/local/lib/salsa/salsa1.1.6.jar" | sha256sum -c - + +RUN apt-get remove curl -y && apt autoremove -y && apt clean -y # Set environment variable for the Salsa compiler jar location ENV SALSA_COMPILER_JAR=/usr/local/lib/salsa/salsa1.1.6.jar