Move Dockerfile to /
This commit is contained in:
parent
dc1eb30b0d
commit
1e535a36f4
2 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
||||||
FROM golang:1.16-alpine as gobuild
|
FROM golang:1.16-alpine as gobuild
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
ADD . /build
|
ADD go.mod go.sum /build/
|
||||||
|
ADD cmd /build/cmd
|
||||||
|
ADD pkg /build/pkg
|
||||||
|
|
||||||
RUN go get -d -v ./...
|
RUN go get -d -v ./...
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./s3driver ./cmd/s3driver
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./s3driver ./cmd/s3driver
|
2
Makefile
2
Makefile
|
@ -26,7 +26,7 @@ test:
|
||||||
docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile .
|
docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile .
|
||||||
docker run --rm --privileged -v $(PWD):/build --device /dev/fuse $(TEST_IMAGE_TAG)
|
docker run --rm --privileged -v $(PWD):/build --device /dev/fuse $(TEST_IMAGE_TAG)
|
||||||
container:
|
container:
|
||||||
docker build -t $(IMAGE_TAG) -f cmd/s3driver/Dockerfile .
|
docker build -t $(IMAGE_TAG) .
|
||||||
push: container
|
push: container
|
||||||
docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME):latest
|
docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME):latest
|
||||||
docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME2):$(VERSION)
|
docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME2):$(VERSION)
|
||||||
|
|
Loading…
Reference in a new issue