Skip to content

Commit

Permalink
Merge branch 'hotfix-0.1.5' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandGouny committed Nov 20, 2015
2 parents b20e183 + 8cf413d commit 440c868
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.1.5
- fix bug with host network

## 0.1.4
- Add run cmd arguments when it's a single process image
- Remove bash from command when it's a single process image
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = osixia/light-baseimage
VERSION = 0.1.4
VERSION = 0.1.5

.PHONY: all build test tag_latest release build-tool

Expand Down
18 changes: 10 additions & 8 deletions image/tool/my_init
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,18 @@ def xstr(s):
return str(s)

def set_env_hostname_to_etc_hosts():
try:
if "HOSTNAME" in os.environ:
with open('/etc/hostname', 'r') as f:
etc_hostname = f.readline().rstrip()

if "HOSTNAME" in os.environ:
with open('/etc/hostname', 'r') as f:
etc_hostname = f.readline().rstrip()

ip_address = socket.gethostbyname(etc_hostname)
ip_address = socket.gethostbyname(etc_hostname)

if os.environ["HOSTNAME"] != etc_hostname:
with open("/etc/hosts", "a") as myfile:
myfile.write(ip_address+" "+os.environ["HOSTNAME"]+"\n")
if os.environ["HOSTNAME"] != etc_hostname:
with open("/etc/hosts", "a") as myfile:
myfile.write(ip_address+" "+os.environ["HOSTNAME"]+"\n")
except:
pass

def python_dict_to_bash_envvar(name, python_dict):

Expand Down

0 comments on commit 440c868

Please sign in to comment.