-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ubuntu:22.04 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt update && apt install -y curl nginx | ||
ADD rustls-libssl_*.deb /root | ||
ADD --chown=nobody:nogroup server.cert / | ||
ADD --chown=nobody:nogroup server.key / | ||
ADD ca.cert /root | ||
ADD nginx.conf /etc/nginx/sites-enabled/default | ||
RUN dpkg -i /root/rustls-libssl_*.deb | ||
|
||
# nb, this only affects systemd runs, but check it works at least | ||
RUN rustls-libssl-nginx enable | ||
|
||
CMD /usr/bin/with-rustls-libssl nginx -g 'env LD_LIBRARY_PATH; daemon off;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
server { | ||
listen 443 ssl; | ||
ssl_certificate /server.cert; | ||
ssl_certificate_key /server.key; | ||
server_name localhost; | ||
|
||
location = / { | ||
return 200 "hello world\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
TAG=$1 | ||
|
||
docker run -i -p 8443:443 $1 & | ||
DOCKER_ID=$! | ||
sleep 2 | ||
|
||
curl --cacert ca.cert https://localhost:8443/ > output.got | ||
echo 'hello world' > output.want | ||
|
||
kill $DOCKER_ID | ||
diff -su output.want output.got |