Skip to content

Commit 58c7f89

Browse files
committed
- [docker](src/docker/bin/docker-entrypoint.sh) Now use entry.d and exit.d.
1 parent 63e6da1 commit 58c7f89

6 files changed

Lines changed: 9 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.0.2
2+
3+
- [docker](src/docker/bin/docker-entrypoint.sh) Now use entry.d and exit.d.
14

25
# 1.0.1
36

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ARG REL=alpine
1313
FROM $DIST:$REL AS base
1414
LABEL maintainer=mlan
1515

16-
ENV DOCKER_ENTRY_DIR=/etc/entrypoint.d \
16+
ENV DOCKER_ENTRY_DIR=/etc/docker/entry.d \
1717
DOCKER_BIN_DIR=/usr/local/bin \
1818
DOCKER_CONF_DIR=/etc/nginx/conf.d \
1919
DOCKER_ENVSUBST_DIR=usr/share/misc \
@@ -26,7 +26,7 @@ ENV DOCKER_ENTRY_DIR=/etc/entrypoint.d \
2626
#
2727

2828
COPY src/*/bin $DOCKER_BIN_DIR/
29-
COPY src/*/entrypoint.d $DOCKER_ENTRY_DIR/
29+
COPY src/*/entry.d $DOCKER_ENTRY_DIR/
3030
COPY src/*/config $DOCKER_CONF_DIR/
3131
COPY src/*/envsubst $DOCKER_ENVSUBST_DIR/
3232

@@ -60,7 +60,7 @@ HEALTHCHECK CMD nginx -t &>/dev/null && wget -O - localhost:80 &>/dev/null \
6060
# Entrypoint, how container is run
6161
#
6262

63-
ENTRYPOINT ["entrypoint.sh"]
63+
ENTRYPOINT ["docker-entrypoint.sh"]
6464

6565
CMD ["nginx", "-g", "daemon off;"]
6666

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Here some implementation details are presented.
125125

126126
## Container init scheme
127127

128-
When the container is started, execution is handed over to the script [`entrypoint.sh`](src/docker/bin/entrypoint.sh). It has 2 stages; 1) *run* all entry scripts in `/etc/entrypoint.d/`, 2) *execute* command in `CMD ["nginx", "-g", "daemon off;"]`.
128+
When the container is started, execution is handed over to the script [`docker-entrypoint.sh`](src/docker/bin/docker-entrypoint.sh). It has 2 stages; 1) *run* all entry scripts in `/etc/docker/entry.d/`, 2) *execute* command in `CMD ["nginx", "-g", "daemon off;"]`.
129129

130130
The entry scripts are responsible for tasks like, generate configurations, and spawning processes.
131131

@@ -135,7 +135,7 @@ The entry scripts, discussed above, as well as other utility scrips are copied t
135135

136136
```dockerfile
137137
COPY src/*/bin $DOCKER_BIN_DIR/
138-
COPY src/*/entrypoint.d $DOCKER_ENTRY_DIR/
138+
COPY src/*/entry.d $DOCKER_ENTRY_DIR/
139139
COPY src/*/config $DOCKER_CONF_DIR/
140140
COPY src/*/envsubst $DOCKER_ENVSUBST_DIR/
141141
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh -e
22

3-
DOCKER_ENTRY_DIR=${DOCKER_ENTRY_DIR-/etc/entrypoint.d}
3+
DOCKER_ENTRY_DIR=${DOCKER_ENTRY_DIR-/etc/docker/entry.d}
44

55
# redirect stderr
66
exec 2>&1
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)