@@ -17,7 +17,7 @@ even as you fire up and shut down new _docker-compose_ projects.
17
17
18
18
## Requirements
19
19
20
- We depend on at least Go 1.9. Also you need to have superuser privileges on your computer.
20
+ You need to have superuser privileges on your computer.
21
21
22
22
## Installation
23
23
@@ -27,13 +27,50 @@ But for resolving `*.docker` to `localhost` (i.e. `127.0.0.1` or `::1`), changes
27
27
28
28
### Linux
29
29
30
- Fetch and build * reception* :
30
+ Install * reception* :
31
31
32
- go get github.com/ninech/reception
32
+ git clone https://github.com/ninech/reception.git
33
+ make
33
34
34
- Make sure that * reception * is responsible for resolving the ` .docker ` TLD :
35
+ Proceed according to your linux configuration :
35
36
36
- sudo -s
37
+ #### Ubuntu 16.04/18.04
38
+
39
+ Instead of ` .docker ` as TLD it's the easiest to just use ` .localhost ` because that's already built-in in the ` systemd-resolver.service ` .
40
+
41
+ Now run * reception* :
42
+
43
+ sudo reception -tld localhost
44
+
45
+ Or install * reception* as systemd service:
46
+
47
+ sudo make install
48
+
49
+ Now try to go to http://reception.localhost .
50
+
51
+ #### Local dnsmasq resolver
52
+
53
+ If you use dnsmasq as your local resolver, add this line to your dnsmasq config:
54
+
55
+ address=/docker/127.0.0.1
56
+
57
+ It tells dnsmasq to resolve ` *.docker ` with the dnsserver listening at ` 127.0.0.1:53 ` (which will be * reception* ).
58
+ Then restart dnsmasq:
59
+
60
+ service dnsmasq restart
61
+
62
+ And now run * reception* :
63
+
64
+ sudo reception
65
+
66
+ You should be able to http://reception.docker now.
67
+
68
+ #### Non-systemd linux
69
+
70
+ Check the content of ` /etc/hosts ` .
71
+ If it doesn't contain any nameservers pointing to ` 127.0.0.1 ` , ` 127.0.0.53 ` or ` ::1 ` , then this way of installation should work for you:
72
+
73
+ sudo -i
37
74
mkdir /etc/resolver
38
75
echo "nameserver ::1" > /etc/resolver/docker
39
76
echo "nameserver 127.0.0.1" >> /etc/resolver/docker
@@ -42,7 +79,7 @@ Now run *reception*:
42
79
43
80
sudo reception
44
81
45
- Try to go to http://reception.docker .
82
+ Finally, try to go to http://reception.docker .
46
83
47
84
### macOS
48
85
@@ -71,7 +108,8 @@ Now try to go to http://reception.docker.
71
108
72
109
## Configuration
73
110
74
- _ reception_ is customizable to some extend. See ` reception -h ` for a complete list of configuration parameters.
111
+ _ reception_ is customizable to some extend.
112
+ See ` reception -h ` for a complete list of configuration parameters.
75
113
76
114
$ reception -h
77
115
(c) 2017 Nine Internet Solutions AG
@@ -115,43 +153,49 @@ avoid port collisions across projects.
115
153
116
154
** Do**
117
155
118
- version: '2'
119
- services:
120
- app:
121
- image: nginx
122
- depends_on: pgsql
123
- ports:
124
- - 80 <----- like this
125
- pgsql:
126
- image: postgresql
156
+ ``` yaml
157
+ version : ' 2'
158
+ services :
159
+ app :
160
+ image : nginx
161
+ depends_on : pgsql
162
+ ports :
163
+ - 80 <----- like this
164
+ pgsql :
165
+ image : postgresql
166
+ ` ` `
127
167
128
168
**Don't**
129
169
130
- version: '2'
131
- services:
132
- app:
133
- image: nginx
134
- depends_on: pgsql
135
- ports:
136
- - 80:80 <----- and _not_ like this (local port)
137
- pgsql:
138
- image: postgresql
139
- ports:
140
- - 5432:5432 <----- and _not_ like this (unnecessary port)
170
+ ` ` ` yaml
171
+ version : ' 2'
172
+ services :
173
+ app :
174
+ image : nginx
175
+ depends_on : pgsql
176
+ ports :
177
+ - 80:80 <----- and _not_ like this (local port)
178
+ pgsql :
179
+ image : postgresql
180
+ ports :
181
+ - 5432:5432 <----- and _not_ like this (unnecessary port)
182
+ ` ` `
141
183
142
184
### HTTP Port
143
185
144
186
In order to detect which port of you container "the http port" is, *reception* looks for the well-known ports
145
187
80, 8080 and 3000. You can override this behaviour by setting the label ` reception.http-port` to a port of your choice:
146
188
147
- version: '2'
148
- services:
149
- app:
150
- image: special
151
- labels:
152
- reception.http-port: '1234' <--- like this
153
- ports:
154
- - 1234
189
+ ` ` ` yaml
190
+ version: '2'
191
+ services:
192
+ app:
193
+ image: special
194
+ labels:
195
+ reception.http-port: '1234' <--- like this
196
+ ports:
197
+ - 1234
198
+ ` ` `
155
199
156
200
# # Troubleshooting
157
201
@@ -161,23 +205,23 @@ You must run *reception* as privileged user (i.e. `root`) for it to be able to b
161
205
162
206
# ## _docker-compose_ projects can't start because of port conflicts
163
207
164
- Most probably you assigned a fixed port mapping for any exposed ports . Look for something like the following:
208
+ Most probably you assigned a fixed port mapping for an exposed port . Look for something like the following :
165
209
166
210
` ` ` yml
167
211
version: 2
168
212
services:
169
213
app:
170
214
ports:
171
- - " 80 :80"
215
+ - "8000 :80" <---- like this
172
216
` ` `
173
217
174
- In the case above, you would just replace ` " 80 :80" ` with ` 80`.
218
+ In the case above, you would just replace `"8000 :80"` with `80`.
175
219
176
220
# ## `reception.docker` does not resolve
177
221
178
222
First, check if *reception* is actually running.
179
223
180
- Then see if `nslookup reception.docker` resolves to `127.0.0.1` or `::1`.
224
+ Then see if `nslookup reception.docker` resolves to `127.0.0.1` or `::1` (respectively `nslookup reception.localhost` on Ubuntu) .
181
225
182
226
If it doesn't, please flush the DNS cache :
183
227
@@ -193,8 +237,12 @@ systemctl restart nscd
193
237
194
238
# # Development
195
239
240
+ We depend on at least Go 1.11.
241
+
196
242
There is a `Makefile` with targets for any common task.
197
243
244
+ **Don't just use `go build`, as it will not bundle the resources!**
245
+
198
246
# ## Build
199
247
200
248
To build the project, run :
@@ -209,9 +257,9 @@ To run a snapshot of the project, run:
209
257
210
258
# ## Release
211
259
212
- To cut a release of the project, run :
260
+ To cut a release of the project, adjust the `VERSION` file and run :
213
261
214
- make release VERSION=2.3.4
262
+ make release
215
263
216
264
# ## Debug the Makefile
217
265
0 commit comments