Compare commits
10 Commits
fa620d6a85
...
13d80089e9
Author | SHA1 | Date | |
---|---|---|---|
13d80089e9 | |||
|
ac534da1e6 | ||
|
fc5ee0724b | ||
|
21b0c32511 | ||
|
fd9e02994e | ||
|
036e890f52 | ||
|
d14ea05f9b | ||
|
54642c3234 | ||
|
7443156ca2 | ||
|
4bd4b9eb0a |
33
.gitea/workflows/docker.yml
Normal file
33
.gitea/workflows/docker.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "dev" ]
|
||||||
|
schedule:
|
||||||
|
- cron: '@weekly'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get current date
|
||||||
|
id: date
|
||||||
|
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||||
|
- uses: https://github.com/actions/checkout@v4
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: https://github.com/docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
config-inline: |
|
||||||
|
[registry."git.schreifuchs.ch"]
|
||||||
|
http = true
|
||||||
|
insecure = true
|
||||||
|
- name: login
|
||||||
|
run: docker login -u schreifuchs -p ${{ secrets.REGISTRY_TOKEN }} git.schreifuchs.ch
|
||||||
|
- run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')"
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: https://github.com/docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: "git.schreifuchs.ch/schreifuchs/webmin-samba-docker:${{ steps.date.outputs.date }},git.schreifuchs.ch/schreifuchs/webmin-samba-docker:latest"
|
12
Dockerfile
12
Dockerfile
@ -4,9 +4,11 @@ WORKDIR /
|
|||||||
COPY Service-check.sh .
|
COPY Service-check.sh .
|
||||||
RUN apt-get update && apt-get upgrade -y
|
RUN apt-get update && apt-get upgrade -y
|
||||||
RUN apt-get install apt-transport-https wget samba samba-common -y && \
|
RUN apt-get install apt-transport-https wget samba samba-common -y && \
|
||||||
mkdir /media/storage /data /data/samba /data/webmin && \
|
mkdir /media/storage /data /data/samba /data/webmin
|
||||||
chmod 0777 /media/storage /data /data/samba /data/webmin && \
|
|
||||||
ln -s /data/samba /etc/samba && ln -s /data/webmin /etc/webmin
|
VOLUME /data
|
||||||
|
|
||||||
|
RUN chmod -R 0777 /media/storage /data
|
||||||
|
|
||||||
RUN echo "deb https://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list && \
|
RUN echo "deb https://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list && \
|
||||||
cd /root && \
|
cd /root && \
|
||||||
@ -24,5 +26,5 @@ RUN sed -i 's/10000/80/g' /etc/webmin/miniserv.conf && \
|
|||||||
sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf
|
sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf
|
||||||
|
|
||||||
RUN echo root:webmin | chpasswd
|
RUN echo root:webmin | chpasswd
|
||||||
VOLUME /config
|
|
||||||
CMD [ "/bin/bash","/Service-check.sh" ]
|
CMD [ "/bin/bash","/Service-check.sh" ]
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# webmin-samba-docker
|
# webmin-samba-docker
|
||||||
|
> this is a Fork of [piersonjarvis/webmin-samba-docker](https://github.com/piersonjarvis/webmin-samba-docker)
|
||||||
|
|
||||||
Docker container based on ubuntu running a samba server, with a webmin webui.
|
Docker container based on ubuntu running a samba server, with a webmin webui.
|
||||||
|
|
||||||
This container was build with simplisity in mind.
|
This container was build with simplisity in mind.
|
||||||
@ -6,3 +8,5 @@ This container was build with simplisity in mind.
|
|||||||
To run this container all you need to do is pass port 80 on the host to port 80 on the contrainer, and mount the volume you wish to share to /media/storage on the container.
|
To run this container all you need to do is pass port 80 on the host to port 80 on the contrainer, and mount the volume you wish to share to /media/storage on the container.
|
||||||
|
|
||||||
Example: docker run -d -p 80:80 -p 139:139 -p 445:445 -v /path/on/host:/media/storage piersonjarvis/webmin-samba
|
Example: docker run -d -p 80:80 -p 139:139 -p 445:445 -v /path/on/host:/media/storage piersonjarvis/webmin-samba
|
||||||
|
|
||||||
|
config files are stored in /data. Add -v /path/on/host:/data to the docker run command to make the configuration files availble for edit on the host.
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
apt-get update && apt-get upgrade -y
|
apt-get update && apt-get upgrade -y
|
||||||
wait
|
wait
|
||||||
|
if [ ! -f /data/webmin/config ];
|
||||||
|
then
|
||||||
|
cp /etc/samba/* /data/samba/. && cp /etc/webmin/* /data/webmin/.
|
||||||
|
fi
|
||||||
|
wait
|
||||||
|
ln -f /data/samba/* /etc/samba/ && ln -f /etc/webmin/* /data/webmin/
|
||||||
service webmin start
|
service webmin start
|
||||||
service smbd start
|
service smbd start
|
||||||
service nmbd start
|
service nmbd start
|
||||||
@ -12,4 +18,4 @@ break
|
|||||||
else
|
else
|
||||||
sleep 5m
|
sleep 5m
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user