diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e56e175 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM busybox:latest +ENV PORT=8080 + +ADD ./www/index.html /www/index.html +ADD ./www/hello-nais.png /www/hello-nais.png + +HEALTHCHECK CMD nc -z localhost $PORT + +# Create a basic webserver and run it until the container is stopped +CMD echo "httpd started" && trap "exit 0;" TERM INT; httpd -v -p $PORT -h /www -f & wait \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..cca4dbd --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Hello NAIS + +This is a bare bone repository containing a simple web server. +The repository is used by the hello nais tutorial in the nais documentation. + +## Local Development + +### Prerequisites + +- [ ] Docker CLI - via one of these alternatives: + - [Colima](https://github.com/abiosoft/colima) - Colima command-line tool (recommended) + - [Rancher](https://rancherdesktop.io) - Rancher desktop + - [Podman](https://podman-desktop.io) - Podman desktop + - [Docker desktop](https://www.docker.com/products/docker-desktop/) - Docker desktop (requires license) + +### Build + +1. Build Docker image: + + ```shell + docker build . -t hello-nais + ``` + +2. Run Docker image: + + ```shell + docker run -p 8080:8080 hello-nais + ``` diff --git a/www/hello-nais.png b/www/hello-nais.png new file mode 100644 index 0000000..8139e75 Binary files /dev/null and b/www/hello-nais.png differ diff --git a/www/index.html b/www/index.html new file mode 100644 index 0000000..69d53dd --- /dev/null +++ b/www/index.html @@ -0,0 +1,21 @@ + + + + + + +
+ Hello Nais +
+ +