Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
1205933acd | |||
e54e191f1b |
17 changed files with 33 additions and 118 deletions
|
@ -34,4 +34,4 @@ COPY --from=build /opt/myriad .
|
||||||
|
|
||||||
EXPOSE 8081
|
EXPOSE 8081
|
||||||
|
|
||||||
CMD ["./myriad"]
|
ENTRYPOINT ["./myriad"]
|
|
@ -16,4 +16,4 @@ COPY --from=build /tmp/myriad .
|
||||||
|
|
||||||
EXPOSE 8081
|
EXPOSE 8081
|
||||||
|
|
||||||
CMD ["./myriad"]
|
ENTRYPOINT ["./myriad"]
|
|
@ -1,12 +1,12 @@
|
||||||
FROM alpine AS build
|
FROM alpine AS build
|
||||||
|
|
||||||
RUN apk update && apk add g++
|
|
||||||
COPY bf.cpp .
|
COPY bf.cpp .
|
||||||
RUN g++ bf.cpp -o bf
|
RUN apk add --no-cache g++ && \
|
||||||
|
g++ bf.cpp -o bf
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
LABEL author="1Computer1"
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
RUN apk update && apk add libstdc++
|
RUN apk add --no-cache libstdc++
|
||||||
COPY --from=build bf /usr/local/bin/
|
COPY --from=build bf /usr/local/bin/
|
||||||
COPY run.sh /var/run/
|
COPY run.sh /var/run/
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
LABEL author="1Computer1"
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
RUN apk update
|
RUN apk add --no-cache gcc libc-dev
|
||||||
RUN apk add gcc libc-dev
|
|
||||||
|
|
||||||
COPY run.sh /var/run/
|
COPY run.sh /var/run/
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
LABEL author="1Computer1"
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
RUN apk update
|
RUN apk add --no-cache g++
|
||||||
RUN apk add g++
|
|
||||||
|
|
||||||
COPY run.sh /var/run/
|
COPY run.sh /var/run/
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
FROM alpine
|
|
||||||
LABEL author="SunRed"
|
|
||||||
|
|
||||||
RUN apk add --no-cache musl-dev gcc ldc
|
|
||||||
|
|
||||||
COPY run.sh /var/run/
|
|
|
@ -1,2 +0,0 @@
|
||||||
cat > program.d
|
|
||||||
ldc2 program.d -of program && ./program
|
|
|
@ -1,14 +1,17 @@
|
||||||
FROM debian:stretch
|
FROM debian:stable-slim
|
||||||
LABEL author="1Computer1"
|
LABEL author="1Computer1"
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends gnupg dirmngr && \
|
apt-get install -y --no-install-recommends gnupg dirmngr ca-certificates && \
|
||||||
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
|
echo 'deb https://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y --no-install-recommends ghc-8.6.5
|
apt-get install -y --no-install-recommends ghc-9.0.1 && \
|
||||||
|
apt-get purge -y gnupg dirmngr ca-certificates && \
|
||||||
|
apt-get autoremove -y && \
|
||||||
|
apt-get autoclean -y
|
||||||
|
|
||||||
ENV PATH /opt/ghc/8.6.5/bin:$PATH
|
ENV PATH /opt/ghc/9.0.1/bin:$PATH
|
||||||
|
|
||||||
COPY run.sh /var/run/
|
COPY run.sh /var/run/
|
||||||
|
|
|
@ -2,6 +2,7 @@ FROM alpine:latest
|
||||||
|
|
||||||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
||||||
apk update && \
|
apk update && \
|
||||||
apk add idris@testing
|
apk add idris@testing && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY run.sh /var/run/
|
COPY run.sh /var/run/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM openjdk:13-alpine
|
FROM openjdk:17-alpine
|
||||||
LABEL author="1Computer1"
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
COPY run.sh /var/run/
|
COPY run.sh /var/run/
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
cat | node -p
|
cat | node
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
RUN apk update
|
RUN apk add --no-cache lua5.3
|
||||||
RUN apk add lua5.3
|
|
||||||
|
|
||||||
COPY run.sh /var/run/
|
COPY run.sh /var/run/
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
FROM openjdk:17-alpine
|
|
||||||
LABEL author="SunRed"
|
|
||||||
|
|
||||||
COPY setlX /usr/local/bin/
|
|
||||||
COPY run.sh /var/run/
|
|
||||||
|
|
||||||
RUN apk add --no-cache curl unzip bash && \
|
|
||||||
curl -O https://download.randoom.org/setlX/pc/setlX_v2-7-2.binary_only.zip && \
|
|
||||||
unzip -d setlx setlX_v2-7-2.binary_only.zip && \
|
|
||||||
rm -f setlX_v2-7-2.binary_only.zip && \
|
|
||||||
mkdir -p /usr/local/setlX && \
|
|
||||||
mv setlx/setlX*.jar /usr/local/setlX && \
|
|
||||||
mkdir -p /usr/local/setlXlibrary && \
|
|
||||||
mv setlx/setlXlibrary/* /usr/local/setlXlibrary && \
|
|
||||||
chmod +x /usr/local/bin/setlX && \
|
|
||||||
rm -rf setlx && \
|
|
||||||
apk del --no-cache curl unzip
|
|
|
@ -1,2 +0,0 @@
|
||||||
cat > program.stlx
|
|
||||||
bash /usr/local/bin/setlX ./program.stlx
|
|
|
@ -1,65 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# launcher script for the setlX interpreter on Unix-like systems
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
# insert path to the folder where you copied the jar files here
|
|
||||||
setlXJarDirectory="/usr/local/setlX/"
|
|
||||||
|
|
||||||
# insert full path to library location here
|
|
||||||
setlXlibraryPath="/usr/local/setlXlibrary/"
|
|
||||||
|
|
||||||
############################## additional options ##############################
|
|
||||||
javaParameters=""
|
|
||||||
|
|
||||||
# uncomment to force execution in 64 bit mode
|
|
||||||
#javaParameters="$javaParameters -d64"
|
|
||||||
|
|
||||||
# uncomment to execute with increased memory size (6GB) (>2GB needs 64 Bit mode!)
|
|
||||||
#javaParameters="$javaParameters -Xmx6144m"
|
|
||||||
|
|
||||||
# uncomment to execute with increased stack size
|
|
||||||
#javaParameters="$javaParameters -Xss48m"
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if [ -n "$OVERRIDE_setlXJarDirectory" ]
|
|
||||||
then
|
|
||||||
setlXJarDirectory="$OVERRIDE_setlXJarDirectory"
|
|
||||||
fi
|
|
||||||
if [ -n "$OVERRIDE_setlXjavaParameters" ]
|
|
||||||
then
|
|
||||||
javaParameters="$OVERRIDE_setlXjavaParameters"
|
|
||||||
fi
|
|
||||||
if [ -z "$SETLX_LIBRARY_PATH" ]
|
|
||||||
then
|
|
||||||
export SETLX_LIBRARY_PATH="$setlXlibraryPath"
|
|
||||||
fi
|
|
||||||
|
|
||||||
java_call="java"
|
|
||||||
|
|
||||||
if [[ -z "$INSIDE_EMACS" && $(which rlwrap > /dev/null 2>&1; echo $?) -eq 0 ]]
|
|
||||||
then
|
|
||||||
java_call="rlwrap -C $(basename $0) $java_call"
|
|
||||||
fi
|
|
||||||
|
|
||||||
jarFiles=""
|
|
||||||
while read -r -d $'\0' jarname
|
|
||||||
do
|
|
||||||
if [ -n "$jarFiles" ]
|
|
||||||
then
|
|
||||||
jarFiles="$jarFiles:"
|
|
||||||
fi
|
|
||||||
jarFiles="$jarFiles${jarname#./}"
|
|
||||||
done < <( find "$setlXJarDirectory" -maxdepth 1 -name "*.jar" -print0 )
|
|
||||||
|
|
||||||
if [ -n "$jarFiles" ]
|
|
||||||
then
|
|
||||||
$java_call -cp "$jarFiles:$CLASSPATH" $javaParameters org.randoom.setlx.pc.ui.SetlX "$@"
|
|
||||||
exit $?
|
|
||||||
else
|
|
||||||
echo "The setlX jar files cannot be found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
|
@ -1,4 +1,4 @@
|
||||||
cat > program.ts
|
cat > program.ts
|
||||||
tsc --lib DOM,ESNext --target ES2019 --strict \
|
tsc --lib DOM,ESNext --target ES2019 --strict \
|
||||||
--skipLibCheck --types /usr/local/share/.config/yarn/global/node_modules/@types/node program.ts \
|
--skipLibCheck --types /usr/local/share/.config/yarn/global/node_modules/@types/node program.ts \
|
||||||
&& cat program.js | node -p
|
&& cat program.js | node
|
||||||
|
|
|
@ -40,13 +40,19 @@ data EvalResult
|
||||||
buildImage :: Language -> Myriad ()
|
buildImage :: Language -> Myriad ()
|
||||||
buildImage lang = do
|
buildImage lang = do
|
||||||
env <- ask
|
env <- ask
|
||||||
logInfo ["Building image ", cs $ imageName lang]
|
logInfo ["Checking for image ", cs $ imageName lang]
|
||||||
exec_ ["docker build -t ", imageName lang, " ", cs (env ^. #languagesDir) </> cs (lang ^. #name)]
|
res <- try $ exec ["docker images -q ", imageName lang]
|
||||||
setupQSems
|
case res of
|
||||||
logInfo ["Built image ", cs $ imageName lang]
|
Left (SomeException err) -> logError ["An exception occured when checking for image ", cs $ imageName lang, ":\n", cs $ show err]
|
||||||
when (env ^. #config % #prepareContainers) . void $ setupContainer lang
|
Right s -> do
|
||||||
|
when (BL.null s) . void $ do -- If string is empty that means the image does not yet exist
|
||||||
|
logInfo ["Building image ", cs $ imageName lang]
|
||||||
|
exec_ ["docker build -t ", imageName lang, " ", cs (env ^. #languagesDir) </> cs (lang ^. #name)]
|
||||||
|
logInfo ["Built image ", cs $ imageName lang]
|
||||||
|
setupQSems
|
||||||
|
when (env ^. #config % #prepareContainers) . void $ setupContainer lang
|
||||||
where
|
where
|
||||||
setupQSems :: Myriad ()
|
setupQSems :: Myriad ()
|
||||||
setupQSems = do
|
setupQSems = do
|
||||||
env <- ask
|
env <- ask
|
||||||
csem <- newQSem 1 -- We only want one container to be set up at a time
|
csem <- newQSem 1 -- We only want one container to be set up at a time
|
||||||
|
|
Loading…
Reference in a new issue