Commit Graph

33 Commits (31411a9462533abb0ca0866c2dccfd9b1ddf553e)

Author SHA1 Message Date
Lunny Xiao 8fd43f215c Revert "Reduce number of layer" (#2086)
This reverts commit 789188f13c.
2017-06-30 01:10:37 -05:00
Dryusdan 789188f13c Reduce number of layer (#2078)
Somes layer are created and aren't usefull, so I compress this :)
2017-06-30 08:58:57 +08:00
Daniel Wendler (@cassandra) 377acb9757 Realy don't cache apk index
Actualy the "-U --no-cache" effectivly is treated as --no-cache
was never specified:

/ # apk -U --no-cache add sed
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/1) Installing sed (4.2.2-r0)
Executing busybox-1.25.1-r0.trigger
OK: 4 MiB in 12 packages
/ # ls -la /var/cache/apk/
total 1004
drwxr-xr-x    1 root     root            70 May  8 11:08 .
drwxr-xr-x    1 root     root            29 Mar  3 11:20 ..
-rw-r--r--    1 root     root        732807 May  5 07:11 APKINDEX.c51f8f92.tar.gz
-rw-r--r--    1 root     root        293014 May  1 12:37 APKINDEX.d09172fd.tar.gz

So removing the "-U" fix this behavior.
2017-05-09 15:34:33 +02:00
Peter Dave Hello a503947fba Upgrade alpine to v3.5 in Dockerfile (#1633) 2017-05-05 08:47:20 +08:00
Peter Dave Hello 1562e9ab70 Refactor Dockerfile
1. Use `apk -U --no-cache add` instead of `apk update` + `apk add` +
manually cache clean up.
2. Separate package installation and user, group setup, the combination
to reduce a docker image layer didn't bring benefits here, only makes
Dockerfiles more complex.
2017-04-29 21:05:25 +02:00
Thomas Boerger c6b6a61bf1 Fixing multiple docker issues (#386)
* Added stupid docker task to makefile

* Dropped unknown option PrintLastLog from docker ssh config

* OpenSSH should log to docker stdout

* Set random pw for docker git user, otherwise it is locked

* Stop using templates and public within docker
2016-12-15 17:16:55 +08:00
Thomas Boerger 6598745f07 Copy gitea binary to docker from correct path (#325)
Signed-off-by: Thomas Boerger <tboerger@suse.de>
2016-12-01 18:53:26 +08:00
Thomas Boerger d7dea676fd
Added -S flag to addgroup command within Dockerfiles 2016-11-28 17:37:31 +01:00
Thomas Boerger 4b0abdae9e
Replaced edge with 3.4 for the alpine base image 2016-11-28 17:23:22 +01:00
Thomas Boerger 972ce6b791
Replaced shadow with addgroup and adduser 2016-11-28 17:22:22 +01:00
Thomas Boerger 65d0426b91
Use su-exec instead of gosu, much smaller 2016-11-28 17:16:13 +01:00
Thomas Boerger 86aa8e413a
Restructured docker building
I have restructured the docker build process entirely, the binary gets
built outside of the docker build command, now we are managing all
dependencies with real Alpine packages and I have dropped features like
socat or the cron daemon.

Signed-off-by: Thomas Boerger <tboerger@suse.de>
2016-11-28 14:13:18 +01:00
Sandro Santilli b7263f31a5 Replace GOGS with GITEA in variable names
Still use GOGS_WORK_DIR and GOGS_CUSTOM env variables
as a fallback if the equivalent GITEA_* are not set,
warning user about the need for change.

Does not change "gogs" to "gitea" in webhook type name
Because "gogs" hook type is part of the API (routes) and used
in templates...

Closes #87
2016-11-07 16:05:18 +01:00
Andrey Arapov 6a98e7d914 docker: Support timezones (#3262) 2016-07-15 10:55:05 +08:00
Jean-Philippe Roemer bcd4adb3a0 Update docker/build.sh script to use glide & make (#3079)
* docker: update build script to use glide + make

- docker/build.sh will now use glide to fetch dependencies
- glide is built from source to keep compatibility with arm
  (no pre-prebuilt binary for arm)
- docker/build.sh will also now use the provided Makefile
  It will generate an error when trying to get git build has as we do
  not ship the 88mo .git directory during the build (should not cause
  any problem as the variable it sets was not set previously)

* docker: fix docker arm build

- drop gosu version back to 1.7 as gosu binary for armhf is broken
- see tianon/gosu#19

* docker: update gosu to 1.9

Signed-off-by: Jean-Philippe Roemer <jp@roemer.im>
2016-05-11 13:11:59 -04:00
Jean-Philippe Roemer 7845075bd2 Dockerfile & Dockerfile.pi updates
- Upgrade of gosu to v1.7
- Change in docker/build.sh to use `--no-cache` to prevent APKINDEX creation when installing dev dependencies
- Manual upgrade of Alpine on Raspberry Pi when building to make sure the environment is the same as the standard Dockerfile
2016-02-25 20:43:40 +00:00
Muh Muhten 5609585ec1 update alpine package dependencies
- s6 is in main in 3.3, so we no longer need to mangle the repos file
- official image is periodically updated, so it's not preferred to do
  upgrades downstream (usually harmless, but inelegant)
- apk-tools in 3.3 supports --no-cache to avoid leaving the APKINDEX
  files in the image
2016-02-19 23:07:20 -05:00
Jean-Philippe Roemer 12c8953381 Update Dockerfile to update alpine to v3.3 & fix virtual package and repository pinning on RPi
- Dockerfile now uses alpine:3.3 as base
- Dockerfile.rpi now uses v3.3/community repository without pinning
- Go package is no longer fetched using repository pinning
- Fixes problem while using repository pinning & virtual package at the same time
2016-01-28 21:31:45 +00:00
Jean-Philippe Roemer 9032bd097b Update Dockerfile & build script and add /etc/nsswitch.conf:
- Add nsswitch.conf to configure LibC Name Service inside the container
- Change my email in the Dockerfile
- Update build script to install software as a `build-deps` virtual package so that adding a package to it will be automatically	removed at the end of the build script
2016-01-25 13:07:37 +00:00
Jean-Philippe Roemer 0cbf56855a Update s6 path following package update 2015-11-16 16:48:09 +00:00
Alvaro Aleman 2671c86ba7 Update gosu, this fixes #1756 2015-10-10 20:48:26 +02: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
Óscar García Amor 3e7d8db7a2 Several bugfixes in Docker build
- Removed unnecessary variables
- Fixed symbolic links creation
- Fixed enter point
- Less intermediate containers
2015-10-02 21:18:13 +02:00
Jean-Philippe Roemer fcb1f4ec07 Add bash to the image so bash git hooks can be used 2015-10-02 12:01:02 +01:00
Jean-Philippe Roemer 3cad8d9492 Use app/docker folder for SSH Configureation 2015-10-02 11:31:05 +01:00
Jean-Philippe Roemer e63e0b3105 New approach to Gogs Docker Container
- VOLUME for ‘/data’
- Usage of S6 as PID 1 Process
- Usage of ‘socat’ so linked container (like databases) are binded to
localhost
- OpenSSH, Socat Link and Gogs are supervised using S6
- Size of container reduced to ~75Mo
2015-10-02 10:56:36 +01:00
Unknwon 232c22208c remove rsync 2015-09-06 18:53:59 -04:00
Unknwon be90ea583a #1521 reduce Docker image size 2015-08-25 12:41:01 +08:00
codeskyblue 4095ef2820 add pam for docker 2015-08-17 09:12:47 -04:00
codeskyblue 9371fbe71a add docker ssh support 2015-08-17 15:17:18 +08:00
codeskyblue feb3cfa067 add missing file 2015-08-17 03:10:23 -04:00
codeskyblue 54b8172a24 some modify, I need to move my workenv to foreign county, network in china is so slow. 2015-08-17 14:32:11 +08:00
Joshua Delsman 406efbf3f5 Adding a project-level Dockerfile & docker-compose script 2015-03-10 07:06:10 -07:00