autobuild
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,16 +1,20 @@
|
||||
FROM ubuntu
|
||||
FROM ubuntu:jammy
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe/Moscow
|
||||
|
||||
RUN apt update && apt install -y apt-utils dnsutils && apt upgrade -y && apt install -y dante-server iproute2 iptables nano curl wget tini
|
||||
ADD danted-init.sh /docker/init.sh
|
||||
ADD docker-entrypoint.sh /docker/entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
RUN apt update && \
|
||||
apt install -y apt apt-utils dnsutils sudo && \
|
||||
apt upgrade -y && \
|
||||
apt install -y dante-server iproute2 iptables nano curl wget tini && \
|
||||
apt autoremove --purge -y && apt clean -y && rm -rf /tmp/* && \
|
||||
chmod 755 /*.sh
|
||||
|
||||
ADD danted-init.sh /danted-init.sh
|
||||
ADD docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
RUN chmod 755 /*.sh
|
||||
EXPOSE 1080
|
||||
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
STOPSIGNAL SIGINT
|
||||
CMD ["/docker-entrypoint.sh"]
|
||||
CMD ["bash", "/docker/entrypoint.sh"]
|
||||
|
||||
17
build.sh
Normal file
17
build.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
export DATE=$(date '+%Y-%m-%d')
|
||||
export IMAGENAME=socks-proxy
|
||||
export OLDDATE=$(cat .build)
|
||||
export REGISTRY=registry.ghostklart.com/dtibragimov
|
||||
|
||||
#docker stop officeproxy
|
||||
#docker rm officeproxy
|
||||
docker rmi $REGISTRY/$IMAGENAME:$OLDDATE -f
|
||||
|
||||
touch .build
|
||||
echo $DATE > .build
|
||||
|
||||
docker build -t $REGISTRY/$IMAGENAME:$DATE .
|
||||
docker tag $REGISTRY/$IMAGENAME:$DATE $REGISTRY/$IMAGENAME:latest
|
||||
echo "y" | docker system prune
|
||||
docker push $REGISTRY/$IMAGENAME -a
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
starting() {
|
||||
echo "Creating user"
|
||||
bash /danted-init.sh
|
||||
bash /docker/init.sh
|
||||
echo "Starting danted"
|
||||
danted -p /danted.pid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user