Run as non-root user
This commit is contained in:
parent
e58330897b
commit
a1878f840f
|
@ -15,8 +15,8 @@ WORKDIR /app
|
||||||
ADD alertify.py /app
|
ADD alertify.py /app
|
||||||
|
|
||||||
# Switching to a non-root user, please refer to https://aka.ms/vscode-docker-python-user-rights
|
# Switching to a non-root user, please refer to https://aka.ms/vscode-docker-python-user-rights
|
||||||
# RUN useradd appuser && chown -R appuser /app
|
RUN useradd appuser && chown -R appuser /app
|
||||||
# USER appuser
|
USER appuser
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,16 @@ This application bridges Alertmanager alerts to [Gotify](https://gotify.net).
|
||||||
|
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
|
## Build
|
||||||
|
```bash
|
||||||
|
docker build . -t 'alertify:latest'
|
||||||
|
```
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
```bash
|
```bash
|
||||||
docker run -p 8080:8080 -e TZ=Europe/London -e GOTIFY_KEY=XXXXXXXX -e GOTIFY_SERVER=gotify -e GOTIFY_PORT=80 alertify:latest
|
docker run --name alertify -p 8080:8080 -e TZ=Europe/London -e GOTIFY_KEY=XXXXXXXX -e GOTIFY_SERVER=gotify -e GOTIFY_PORT=80 alertify:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## Compose:
|
## Compose:
|
||||||
|
|
Loading…
Reference in a new issue