add build_and_push

This commit is contained in:
ngxson
2023-03-08 10:41:57 +01:00
parent 533e5caa54
commit 9792c6ce6a
4 changed files with 28 additions and 2 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules
data
data
Dockerfile.tmp

View File

@@ -1,4 +1,4 @@
FROM portainer/portainer-ce:2.17.0 as portainer
FROM portainer/portainer-ce:latest as portainer
FROM node:18-alpine3.17
WORKDIR /

View File

@@ -1,2 +1,11 @@
# portainer-ce-without-annoying
This is a drop-in replacement for [portainer/portainer-ce](https://hub.docker.com/r/portainer/portainer-ce), without annoying UI elements.
`portainer-ce-without-annoying` is **NOT** a fork of `portainer-ce`. It is just an overlay script / proxy to inject styles / scripts, allow removing DOM elements.
## How to use
If you already have `portainer-ce` installation, just replace `portainer/portainer-ce:latest` with `ngxson/portainer-ce-without-annoying:latest`
Alternatively, you can use [this docker-compose.yml](https://github.com/ngxson/portainer-ce-without-annoying/blob/master/docker-compose.yml)

16
build_and_push.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Get newest tag from https://hub.docker.com/r/portainer/portainer-ce/tags
# Also build one for :latest
IMAGE="ngxson/portainer-ce-without-annoying"
if [ -z "$TAG" ]; then
echo "Please set TAG environment variable"
exit 1
fi
cp Dockerfile Dockerfile.tmp
sed -i "s/portainer-ce:latest/portainer-ce:$TAG/g" Dockerfile.tmp
docker build -t "$IMAGE:$TAG" -f Dockerfile.tmp .
docker push "$IMAGE:$TAG"