mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-25 20:07:55 +00:00
Compare commits
10 Commits
rel-0.9.17
...
rel-0.9.18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6052c7a3e7 | ||
|
|
bfd971a084 | ||
|
|
d141556910 | ||
|
|
19d67d820c | ||
|
|
14ec533a16 | ||
|
|
784d9837ee | ||
|
|
d3f2382c73 | ||
|
|
e053f04cf6 | ||
|
|
bbc639b372 | ||
|
|
f8c4992d03 |
@@ -1,3 +1,8 @@
|
||||
## 0.9.18 (release date: 2015-12-08)
|
||||
|
||||
* The latest OpenSSL updates have been pulled in. This fixes [CVE-2015-3193](https://www.openssl.org/news/secadv/20151203.txt) and a few others. Upgrading is strongly recommended.
|
||||
|
||||
|
||||
## 0.9.17 (release date: 2015-07-15)
|
||||
|
||||
* The latest OpenSSL updates have been pulled in. This fixes [CVE-2015-1793](http://openssl.org/news/secadv_20150709.txt). Upgrading is strongly recommended.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,5 +1,5 @@
|
||||
NAME = phusion/baseimage
|
||||
VERSION = 0.9.17
|
||||
VERSION = 0.9.18
|
||||
|
||||
.PHONY: all build test tag_latest release ssh
|
||||
|
||||
|
||||
40
README.md
40
README.md
@@ -1,6 +1,6 @@
|
||||
# A minimal Ubuntu base image modified for Docker-friendliness
|
||||
|
||||
[](https://imagelayers.io/?images=phusion/baseimage:latest 'Get your own badge on imagelayers.io')
|
||||
[](https://imagelayers.io/?images=phusion/baseimage:latest 'Get your own badge on imagelayers.io')
|
||||
|
||||
Baseimage-docker is a special [Docker](https://www.docker.com) image that is configured for correct use within Docker containers. It is Ubuntu, plus:
|
||||
|
||||
@@ -530,45 +530,19 @@ If you want to call the resulting image something else, pass the NAME variable,
|
||||
|
||||
The default baseimage-docker installs `syslog-ng`, `cron` and `sshd` services during the build process.
|
||||
|
||||
In case you don't need one or more of these services in your image, you can disable its installation and/or install the substituite service of your preference.
|
||||
In case you don't need one or more of these services in your image, you can disable its installation.
|
||||
|
||||
You can user the `ENV` directive in your Dockerfile for these three variables :
|
||||
|
||||
* `DISABLE_SYSLOG`
|
||||
* `DISABLE_SSH`
|
||||
* `DISABLE_CRON`
|
||||
|
||||
For ex., if you want to disable ssh on your image :
|
||||
|
||||
#...
|
||||
FROM phusion/baseimage:<VERSION>
|
||||
|
||||
# Set correct environment variables.
|
||||
ENV HOME /root
|
||||
|
||||
# Disable SSH
|
||||
ENV DISABLE_SSH 1
|
||||
|
||||
# Use baseimage-docker's init system.
|
||||
CMD ["/sbin/my_init"]
|
||||
|
||||
# ...put your own build instructions here...
|
||||
|
||||
# Clean up APT when done.
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
If you don't want to use the `ENV` directive inside your Dockerfile and avoid creating another image layer, as shown in the following example, to prevent `sshd` from being installed into your image, set `1` to the `DISABLE_SSH` variable in the `./image/buildconfig` file.
|
||||
As shown in the following example, to prevent `sshd` from being installed into your image, set `1` to the `DISABLE_SSH` variable in the `./image/buildconfig` file.
|
||||
|
||||
### In ./image/buildconfig
|
||||
# ...
|
||||
# Default services
|
||||
# Set 1 to the service you want to disable
|
||||
export DISABLE_SYSLOG=${DISABLE_SYSLOG:-0}
|
||||
export DISABLE_SSH=${DISABLE_SSH:-1}
|
||||
export DISABLE_CRON=${DISABLE_CRON:-0}
|
||||
export DISABLE_SYSLOG=0
|
||||
export DISABLE_SSH=1
|
||||
export DISABLE_CRON=0
|
||||
|
||||
|
||||
Then you can proceed with `docker build` command.
|
||||
Then you can proceed with `make build` command.
|
||||
|
||||
<a name="conclusion"></a>
|
||||
## Conclusion
|
||||
|
||||
@@ -20,10 +20,10 @@ ln -s /etc/container_environment.sh /etc/profile.d/
|
||||
$minimal_apt_get_install runit
|
||||
|
||||
## Install a syslog daemon and logrotate.
|
||||
[ "$DISABLE_SYSLOG" -eq 0 ] && /bd_build/services/syslog-ng/syslog-ng.sh
|
||||
[ "$DISABLE_SYSLOG" -eq 0 ] && /bd_build/services/syslog-ng/syslog-ng.sh || true
|
||||
|
||||
## Install the SSH server.
|
||||
[ "$DISABLE_SSH" -eq 0 ] && /bd_build/services/sshd/sshd.sh
|
||||
[ "$DISABLE_SSH" -eq 0 ] && /bd_build/services/sshd/sshd.sh || true
|
||||
|
||||
## Install cron daemon.
|
||||
[ "$DISABLE_CRON" -eq 0 ] && /bd_build/services/cron/cron.sh
|
||||
[ "$DISABLE_CRON" -eq 0 ] && /bd_build/services/cron/cron.sh || true
|
||||
|
||||
@@ -21,7 +21,7 @@ ID=`docker run -d -v $PWD/test:/test $NAME:$VERSION /sbin/my_init --enable-insec
|
||||
sleep 1
|
||||
|
||||
echo " --> Obtaining IP"
|
||||
IP=`docker inspect $ID | grep IPAddress | sed -e 's/.*: "//; s/".*//'`
|
||||
IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" "$ID"`
|
||||
if [[ "$IP" = "" ]]; then
|
||||
abort "Unable to obtain container IP"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user