Commit Graph

15 Commits

Author SHA1 Message Date
eightpigs
28d74a9844 docker: fix the bug of using root to create /data/ directory (#6106) 2020-04-15 19:42:32 +08:00
ᴜɴᴋɴᴡᴏɴ
5753d4cb87 Revert "docker: fix the bug of using root account to create `/d… (#6085)
This reverts commit f3b05961aa.
2020-04-10 22:58:55 +08:00
eightpigs
f3b05961aa docker: fix the bug of using root account to create /data/* directory (#6068)
* Fix the bug of using root account to create /data directory

* Fix the bug that sshkey cannot be added in the container and remove unnecessary chown.
2020-04-07 15:12:08 +08:00
Achilleas Koutsou
91e9495148 docker: check "/app/gogs" separately on startup (#5895)
When running gogs after the first time, if the image has changed (update
rebuild), the /app/gogs directory will have changed owner back to
root:root, but /data will likely not be since the data directories are
likely to be persistent.

Checking /app/gogs separately fixes this.
2020-01-23 02:22:30 +08:00
Atsushi Midorikawa
9571a9b53d docker: change how to check whether initial or not (#5766) 2019-08-10 20:05:11 -07:00
Paul Spieker
044a45db2e docker: prevent Gogs from running a recursive chown on each boot (#5724)
The chown command in the setup file of Gogs is supposed to be executed just once. As soon as the app.ini file exists, this step should be skipped. However, the test was checking if a directory with the name app.ini exists instead of a file. Therefore, the chown command was executed on each boot.
2019-06-16 13:42:56 -04:00
Unknwon
0d48344f93 docker: chown only for the frist time (#5422) 2018-09-15 13:57:41 -04:00
Unknwon
21ceba6cfd Revert "docker: remove chown the git repos on startup (refs #4996). (#5390)"
This reverts commit 068e6ce2c9.
2018-09-15 13:46:14 -04:00
Ross Golder
068e6ce2c9 docker: remove chown the git repos on startup (refs #4996). (#5390) 2018-09-08 08:07:30 -04:00
Ross Williams
925c2a2ca2 docker: symlink fixes (#4747)
* Prevent circular links (symlinks) from being created:
	* /data/gogs/log/log -> /data/gogs/log
	* /data/gogs/data/data -> /data/gogs/data
	* /data/git/git -> /data/git
2017-11-18 00:50:07 -05:00
Jean-Philippe Roemer
9a8aeef478 Add syslog & fix /data/git rights & SOCAT_LINK env var
- Resolve #1893
- Add syslogd to output sshd log on stdout (via `docker logs`)
- Enforce directory rights on `/data/git`, `/data/gogs` & `/data/ssh`
- Add `SOCAT_LINK` environment variable to prevent the creation of scout links when they are not needed (see #1815)
2015-11-04 19:22:15 +00:00
Jean-Philippe Roemer
533c6a8e08 Edit comment to make it clear that we are talking about container version 2015-10-12 21:52:20 +01:00
Jean-Philippe Roemer
bfed40eec4 Docker repository path backward compatibility fix:
- resolve #1765
- create link to old git repository path: `/home/git/gogs-repository`
2015-10-12 21:28:26 +01:00
Jean-Philippe Roemer
9cba6ff84b Volumed data setup changed to allow #1759
- Volumed subfolder now created up in the ENTRYPOINT script, this way
  they are created before S6 even starts making VOLUME.
- The subfolder will be created during VOLUME creation too as ENTRYPOINT
  script will be run before /bin/true
- SSH Keys will now be created on a single key basis not replying on the
  existence of /data/ssh folder
2015-10-12 18:46:45 +01:00
Jean-Philippe Roemer
ad5e0b833c Docker Container: Init 1 & Initialisation
- Now using a setup script before starting the app. The separation of
the run script and the setup script will make service initialisation a
little bit clearer
- Now calling start.sh script as ENTRYPOINT and S6 as CMD. This way
when running the container with just a shell script, the start.sh
script will be launched before, making debugging easier
- Added note about `.dockerignore` ignored during Docker Hub Automated
Build
2015-10-02 23:13:39 +01:00