Skip to content

Commit df0a535

Browse files
author
Lukas Matt
committed
Fix listening host for docker container
1 parent dd941b8 commit df0a535

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ ENV DEBIAN_FRONTEND noninteractive
44

55
RUN apt-get update
66
RUN apt-get install -y curl
7-
RUN apt-get clean && apt-get autoclean
87

98
RUN useradd -ms /bin/bash user
109

11-
USER user
10+
RUN curl -o /usr/local/bin/github-integration -L https://github.com/thefederationinfo/github-integration/releases/download/v1.0.2/github-integration.$(uname -m)
1211

13-
WORKDIR /home/user
14-
RUN curl -o /home/user/github-integration -L https://github.com/thefederationinfo/github-integration/releases/download/v1.0.1/github-integration.$(uname -m)
12+
RUN apt-get purge -y curl
13+
RUN apt-get autoremove -y
14+
RUN apt-get clean && apt-get autoclean
1515

16-
RUN chmod +x /home/user/github-integration
16+
RUN chmod +x /usr/local/bin/github-integration
17+
18+
USER user
19+
WORKDIR /home/user
1720

1821
EXPOSE 8181
1922

20-
CMD ["sh", "-c", "/home/user/github-integration --github-id ${GITHUB_ID} --github-secret ${GITHUB_SECRET} --server-domain ${DOMAIN} --travis-token ${TRAVIS_SECRET}"]
23+
CMD ["sh", "-c", "/usr/local/bin/github-integration --github-id ${GITHUB_ID} --github-secret ${GITHUB_SECRET} --server-domain ${DOMAIN} --travis-token ${TRAVIS_SECRET}"]

server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ func main() {
9292
http.HandleFunc("/auth", authentication)
9393
http.HandleFunc("/hook", webhook)
9494

95-
logger.Println("Running webserver on 127.0.0.1:8181")
96-
logger.Println(http.ListenAndServe("127.0.0.1:8181", nil))
95+
logger.Println("Running webserver on :8181")
96+
logger.Println(http.ListenAndServe(":8181", nil))
9797
}

0 commit comments

Comments
 (0)