-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from DaoCloud/hotfix/container-id
show 2048 container id on website with one question
- Loading branch information
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
# Using a compact OS | ||
FROM alpine:latest | ||
|
||
MAINTAINER Golfen Guo <[email protected]> | ||
MAINTAINER Golfen Guo <[email protected]> | ||
|
||
# Install and configure Nginx | ||
RUN apk --update add nginx | ||
RUN sed -i "s#root html;#root /usr/share/nginx/html;#g" /etc/nginx/nginx.conf | ||
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
|
||
# Add 2048 stuff into Nginx server | ||
COPY . /usr/share/nginx/html | ||
|
||
EXPOSE 80 | ||
|
||
# Start Nginx and keep it from running background | ||
CMD ["nginx", "-g", "pid /tmp/nginx.pid; daemon off;"] | ||
|
||
# Start Nginx and keep it running background and start php | ||
CMD sed -i "s/ContainerID: /ContainerID: "$(hostname)"/g" /usr/share/nginx/html/index.html && nginx -g "pid /tmp/nginx.pid; daemon off;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters