Skip to content

Commit

Permalink
docker: use .dockerignore to simplify Dockerfile
Browse files Browse the repository at this point in the history
add Dockerfile to .dockerignore, which achieves the same effect of
quicker iteration, without having to manually add each separate file and
directory to the build image.
  • Loading branch information
willnorris authored and bradfitz committed Jun 17, 2022
1 parent 1302c5a commit 5bf7589
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions .dockerignore
@@ -1,3 +1,4 @@
bin/*
tmp/*
misc/docker/release/*
Dockerfile
17 changes: 1 addition & 16 deletions Dockerfile
Expand Up @@ -18,22 +18,7 @@ WORKDIR /go/src/perkeep.org
COPY go.mod go.sum ./
RUN go mod download

# Add each directory separately, so our context doesn't include the
# Dockerfile itself, to permit quicker iteration with docker's
# caching.
ADD .git /go/src/perkeep.org/.git
add app /go/src/perkeep.org/app
ADD clients /go/src/perkeep.org/clients
ADD cmd /go/src/perkeep.org/cmd
ADD config /go/src/perkeep.org/config
ADD dev /go/src/perkeep.org/dev
ADD doc /go/src/perkeep.org/doc
ADD internal /go/src/perkeep.org/internal
ADD pkg /go/src/perkeep.org/pkg
ADD server /go/src/perkeep.org/server
ADD website /go/src/perkeep.org/website
ADD make.go /go/src/perkeep.org/make.go
ADD VERSION /go/src/perkeep.org/VERSION
COPY . .

RUN go run make.go -v

Expand Down

0 comments on commit 5bf7589

Please sign in to comment.