diff --git a/Dockerfile b/Dockerfile index fd214da3..00c5264f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,10 @@ ENV BASE_URL=${BASE_URL} RUN pnpm build # production stage -FROM nginx:stable-alpine AS production-stage +FROM nginxinc/nginx-unprivileged:stable-alpine AS production-stage ARG BASE_URL ENV BASE_URL=${BASE_URL} COPY --from=build-stage /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf -EXPOSE 80 +EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index 303c9868..c0a461e0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +## BREAKING CHANGE for Docker Image + +Since *Docker base image* is now `nginx-unpriviledged`, docker image now listen to **8080** and no more 80. So you need to update your port mapping, ie from `8080:80` to `8080:8080`. + ### Check out these change here: You can use my image in your docker-compose file if you want an update to date version of it-tools (with my PR and some of others) until the main branch has been updated. @@ -15,7 +19,7 @@ Almost [all tools PR of it-tools](https://github.com/sharevb/it-tools/pulls). According to https://github.com/sharevb/it-tools/pull/461#issuecomment-1602506049: ``` docker build -t it-tools --build-arg BASE_URL="/my-folder/" . -docker run -d --name it-tools --restart unless-stopped -p 8080:80 it-tools +docker run -d --name it-tools --restart unless-stopped -p 8080:8080 it-tools ``` ## Use in Docker Compose file @@ -28,7 +32,7 @@ services: pull_policy: always restart: unless-stopped ports: - - 8080:80 + - 8080:8080 ``` ## Installation methods @@ -62,13 +66,13 @@ Self host solutions for your homelab **From docker hub:** ```sh -docker run -d --name it-tools --restart unless-stopped -p 8080:80 corentinth/it-tools:latest +docker run -d --name it-tools --restart unless-stopped -p 8080:8080 corentinth/it-tools:latest ``` **From github packages:** ```sh -docker run -d --name it-tools --restart unless-stopped -p 8080:80 ghcr.io/corentinth/it-tools:latest +docker run -d --name it-tools --restart unless-stopped -p 8080:8080 ghcr.io/corentinth/it-tools:latest ``` **Other solutions:** diff --git a/nginx.conf b/nginx.conf index 67e4472b..cfb23c85 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,5 +1,5 @@ server { - listen 80; + listen 8080; server_name _; root /usr/share/nginx/html; index index.html; @@ -7,4 +7,4 @@ server { location / { try_files $uri $uri/ /index.html; } -} \ No newline at end of file +}