mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-10 23:54:42 +00:00
- create dockerfile and makefile for building docker image
This commit is contained in:
parent
d4810bebdb
commit
c350784507
2 changed files with 24 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
FROM alpine
|
||||
MAINTAINER Adnan Hajdarevic <adnanh@gmail.com>
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV SRCPATH ${GOPATH}/src/github.com/adnanh/webhook
|
||||
COPY . ${SRCPATH}
|
||||
RUN apk add --update -t build-deps go git libc-dev gcc libgcc && \
|
||||
cd ${SRCPATH} && go get -d && go build -o /usr/local/bin/webhook && \
|
||||
apk del --purge build-deps && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
rm -rf ${GOPATH}
|
||||
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["/usr/local/bin/webhook"]
|
10
Makefile
Normal file
10
Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
DOCKER_IMAGE_NAME=adnanh/webhook
|
||||
CONTAINER_NAME=webhook
|
||||
|
||||
docker-build: Dockerfile
|
||||
docker build --force-rm=true --tag=${DOCKER_IMAGE_NAME} .
|
||||
|
||||
docker-run:
|
||||
@echo "Here's an example command on how to run a webhook container:"
|
||||
@echo "docker run -d -p 9000:9000 -v /etc/webhook:/etc/webhook --name=${CONTAINER_NAME} \\"
|
||||
@echo " ${DOCKER_IMAGE_NAME} -verbose -hooks=/etc/webhook/hooks.json -hotreload"
|
Loading…
Add table
Reference in a new issue