mirror of
https://github.com/cnotch/ipchub.git
synced 2025-09-26 19:41:18 +08:00
test docker
This commit is contained in:
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
RUN mkdir /app
|
||||||
|
WORKDIR /app
|
||||||
|
COPY bin/docker .
|
||||||
|
# Expose ipchub ports
|
||||||
|
EXPOSE 554
|
||||||
|
CMD ["./ipchub"]
|
8
makefile
8
makefile
@@ -14,7 +14,13 @@ build:
|
|||||||
cp -r demos bin/
|
cp -r demos bin/
|
||||||
cp -r docs bin/
|
cp -r docs bin/
|
||||||
|
|
||||||
# linux compilation
|
build-docker:
|
||||||
|
CGO_ENABLED=$(ENABLED_CGO) GOOS=linux GOARCH=amd64 $(GOBUILD) -o bin/docker/$(BINARY_NAME) -ldflags "-X github.com/cnotch/ipchub/config.Version=$(VERSION)" .
|
||||||
|
cp -r demos bin/docker/
|
||||||
|
cp -r docs bin/docker/
|
||||||
|
docker build -t ipchub .
|
||||||
|
rm -rf bin/docker
|
||||||
|
|
||||||
build-linux-amd64:
|
build-linux-amd64:
|
||||||
CGO_ENABLED=$(ENABLED_CGO) GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/linux/amd64/$(BINARY_NAME) -ldflags "-X github.com/cnotch/ipchub/config.Version=$(VERSION)" .
|
CGO_ENABLED=$(ENABLED_CGO) GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/linux/amd64/$(BINARY_NAME) -ldflags "-X github.com/cnotch/ipchub/config.Version=$(VERSION)" .
|
||||||
cp -r demos $(BINARY_DIR)/linux/amd64/
|
cp -r demos $(BINARY_DIR)/linux/amd64/
|
||||||
|
Reference in New Issue
Block a user