From fa196a2c9424e189b7fcad22edf69cd7fa6fd6ee Mon Sep 17 00:00:00 2001 From: Alyx Date: Mon, 18 Mar 2024 09:52:29 +0100 Subject: [PATCH] Add Dockerfile --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f4ae366 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM busybox:1 AS build +ARG PHANPY_RELEASE_VERSION + +WORKDIR /root/phanpy_release + +RUN wget "https://github.com/cheeaun/phanpy/releases/download/${PHANPY_RELEASE_VERSION}/phanpy-dist.tar.gz" && \ + tar -xvf "phanpy-dist.tar.gz" -C /root/phanpy_release && \ + rm "phanpy-dist.tar.gz" + +# --- +FROM busybox:1 + +# Create a non-root user to own the files and run our server +RUN adduser -D static +USER static +WORKDIR /home/static + +# Copy the static website +# Use the .dockerignore file to control what ends up inside the image! +COPY --chown=static:static --from=build /root/phanpy_release /home/static + +# Run BusyBox httpd +CMD ["httpd", "-f", "-v", "-p", "8080"]