mirror of
https://github.com/linuxserver/docker-project-template.git
synced 2026-02-20 02:41:25 +08:00
commit
a661a3bc2e
@ -1,34 +1,24 @@
|
||||
FROM linuxserver/baseimage
|
||||
FROM lsiobase/alpine
|
||||
MAINTAINER Your Name <your@email.com>
|
||||
ARG DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
ENV APTLIST="packages to install and update via apt"
|
||||
# install packages
|
||||
RUN \
|
||||
|
||||
#Applying stuff
|
||||
RUN apt-get update -q && \
|
||||
apt-get install $APTLIST -qy && \
|
||||
##DO STUFF HERE
|
||||
##DO STUFF HERE
|
||||
## END EACH LINE WITH && \
|
||||
## EXCEPT THE LINE BELOW
|
||||
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||
|
||||
|
||||
#Adding Custom files
|
||||
COPY init/ /etc/my_init.d/
|
||||
COPY services/ /etc/service/
|
||||
COPY cron/ /etc/cron.d/
|
||||
COPY defaults/ /defaults/
|
||||
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
||||
# Volumes and Ports
|
||||
VOLUME /volume
|
||||
# ports and volumes
|
||||
EXPOSE PORT
|
||||
VOLUME /volume
|
||||
|
||||
## NOTES ##
|
||||
## Delete files\folders not needed, e.g. if you dont run any cron commands, delete the cron folder and the "ADD cron/ /etc/cron.d/" line.
|
||||
## The User abc, should be running everything, give that permission in any case you need it.
|
||||
## Use linuxserver/baseimage as often as posible (or linuxserver/baseimage.nginx/apache/python where applicable)
|
||||
## When creating init's Use 10's where posible, its to allow add stuff in between when needed. also, do not be afraid to split custom code into several little ones.
|
||||
## Make stuff as quiet as posible "e.g. apt-get update -qq" (Does not apply to the "app" itself. e.g. plex)
|
||||
## Delete files\folders not needed
|
||||
## The User abc, should be running everything, give that permission in any case you need it.
|
||||
## When creating init's Use 10's where posible, its to allow add stuff in between when needed. also, do not be afraid to split custom code into several little ones.
|
||||
## user abc and folders /app /config /defaults are all created by baseimage
|
||||
## the first available init script is 30<your script>.sh
|
||||
## the first available init script is 30<your script>
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||

|
||||

|
||||
|
||||
## This is a Container in active development by the [LinuxServer.io](https://linuxserver.io) team and is not recommended for use by the general public.
|
||||
|
||||
If you want to comment\contribute on this container , are looking for support on any of our other work , or are curious about us in general, check out the following.
|
||||
|
||||
* [forum.linuxserver.io](https://forum.linuxserver.io)
|
||||
* [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`
|
||||
* [Podcast](https://www.linuxserver.io/index.php/category/podcast/) covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
|
||||
|
||||
## This is a Container in active development, and should not be used by the general public.
|
||||
If you are curious about the current progress or want to comment\contribute to this work, feel free to join us at our irc channel:
|
||||
[IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io` or visit our website at [https://linuxserver.io](https://www.linuxserver.io/).
|
||||
|
||||
@ -9,7 +9,7 @@ The [LinuxServer.io](https://linuxserver.io) team brings you another container r
|
||||
|
||||
Provide a short, concise description of the application. No more than two SHORT paragraphs. Link to sources where possible and include an image illustrating your point if necessary. Point users to the original applications website, as that's the best place to get support - not here.
|
||||
|
||||
Our Plex container has immaculate docs so follow that if in doubt for layout.
|
||||
Our Plex container has immaculate docs so follow that if in doubt for layout.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -29,6 +29,7 @@ docker create \
|
||||
* `-e PGID` for GroupID - see below for explanation
|
||||
* `-e PUID` for UserID - see below for explanation
|
||||
|
||||
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it <container-name> /bin/bash`.
|
||||
|
||||
### User / Group Identifiers
|
||||
|
||||
@ -46,10 +47,9 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
|
||||
Insert a basic user guide here to get a n00b up and running with the software inside the container. DELETE ME
|
||||
|
||||
|
||||
## Updates
|
||||
## Info
|
||||
|
||||
* Shell access whilst the container is running: `docker exec -it container-name /bin/bash`
|
||||
* Upgrade to the latest version: `docker restart container-name`
|
||||
* To monitor the logs of the container in realtime: `docker logs -f container-name`
|
||||
|
||||
## Versions
|
||||
|
||||
@ -1 +0,0 @@
|
||||
* * * * * abc /path/to/command/to/run.sh
|
||||
@ -1,5 +0,0 @@
|
||||
#!/sample/file
|
||||
|
||||
Do not use numbers 00,01,99 for sorting
|
||||
Baseimage contains 10_add_user_abc.sh
|
||||
|
||||
4
template/root/etc/cont-init.d/30-sample
Normal file
4
template/root/etc/cont-init.d/30-sample
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
### above is proper shebang for image using s6
|
||||
|
||||
|
||||
3
template/root/etc/services.d/servicename/run
Normal file
3
template/root/etc/services.d/servicename/run
Normal file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
exec \
|
||||
s6-setuidgid abc /command/to/execute
|
||||
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
exec /sbin/setuser abc "/command/to/execute"
|
||||
Loading…
x
Reference in New Issue
Block a user