4 changed files with 59 additions and 2 deletions
@ -0,0 +1,17 @@ |
|||||||
|
FROM alpine:latest |
||||||
|
|
||||||
|
ARG GAME_URL |
||||||
|
ARG GAME_ARGS |
||||||
|
|
||||||
|
WORKDIR site |
||||||
|
RUN wget https://js-dos.com/6.22/current/js-dos.js && \ |
||||||
|
wget https://js-dos.com/6.22/current/wdosbox.js && \ |
||||||
|
wget https://js-dos.com/6.22/current/wdosbox.wasm.js && \ |
||||||
|
wget -O game.zip "$GAME_URL" |
||||||
|
|
||||||
|
RUN apk add darkhttpd |
||||||
|
|
||||||
|
COPY index.html doom.png ./ |
||||||
|
RUN sed -i s/GAME_ARGS/$GAME_ARGS/ index.html |
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/darkhttpd", "/site", "--port", "8000"] |
||||||
@ -1,3 +1,10 @@ |
|||||||
# docker-doom |
# docker-shadowpresident |
||||||
|
|
||||||
docker image of Doom running on js-dos |
docker image of Doom running on js-dos |
||||||
|
|
||||||
|
run the following to build |
||||||
|
`docker build -t docker-doom --build-arg GAME_URL=https://code.imhard4.men/crappyrules/docker-doom/raw/branch/master/doom.ZIP --build-arg GAME_ARGS=\"DOOM.EXE\" .` |
||||||
|
|
||||||
|
once you have built the image, run with |
||||||
|
|
||||||
|
`docker run -d -p 8000:8000 docker-doom` |
||||||
|
After Width: | Height: | Size: 43 KiB |
@ -0,0 +1,33 @@ |
|||||||
|
<html> |
||||||
|
<style type="text/css" media="screen"> |
||||||
|
canvas { |
||||||
|
width: 800px; |
||||||
|
height: 600px; |
||||||
|
} |
||||||
|
</style> |
||||||
|
<head> |
||||||
|
<title>Doom Online</title> |
||||||
|
<script src="js-dos.js"></script> |
||||||
|
</head> |
||||||
|
<body bgcolor="black" text="white"> |
||||||
|
<canvas id="jsdos" width="800" height="600" ></canvas> |
||||||
|
<script> |
||||||
|
Dos(document.getElementById("jsdos"), { |
||||||
|
}).ready((fs, main) => { |
||||||
|
fs.extract("game.zip").then(() => { |
||||||
|
main(["-c", GAME_ARGS]) |
||||||
|
}); |
||||||
|
}); |
||||||
|
</script> |
||||||
|
<br><br><br><br><br> |
||||||
|
<center><form> |
||||||
|
<input type="button" value="Go back!" onclick="history.back()"> |
||||||
|
</form></center> |
||||||
|
<h3>DOOM</h3> |
||||||
|
<p><center><img src="doom.png" width="400" height="400"></center></p> |
||||||
|
<p><b>You're a space marine armed with a mere pistol. Your mission is to locate more substantial firepower, blow your way through an onslaught of |
||||||
|
undead marines and mutant demons from hell, and navigate yourself off a radioactive moon base. In order to survive, not only do you have to make it |
||||||
|
through the first 27 blood-splattered levels of Doom, you also have to get through nine more incredibly tough expert levels in the all-new |
||||||
|
episode "Thy Flesh Consumed." </b></p> |
||||||
|
</body> |
||||||
|
</html> |
||||||
Loading…
Reference in new issue