Skip to content

Commit

Permalink
Remove packages from registry Docker build
Browse files Browse the repository at this point in the history
The Dockerfile for the registry itself should not contain any packages. Instead it should be empty and there are other distributions with packages, see elastic/package-storage#86. This removes the packages from the default Docker build.
  • Loading branch information
ruflin committed Jul 2, 2020
1 parent 41c150c commit 711bc76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ COPY ./ /home/package-registry
WORKDIR /home/package-registry

ENV GO111MODULE=on
RUN go get -u github.com/magefile/mage
# Prepare all the packages to be built
RUN mage build

# Build binary
RUN go build .
Expand All @@ -26,7 +23,6 @@ RUN go build .
RUN mkdir -p /registry/public # left for legacy purposes
RUN mkdir -p /registry/packages/package-storage
RUN mv package-registry /registry/
RUN cp -r build/package-storage/packages/* /registry/packages/package-storage/
RUN cp config.docker.yml /registry/config.yml

# Change to new working directory
Expand Down
2 changes: 1 addition & 1 deletion config.docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public_dir: ./public
package_paths:
- ./packages/package-storage
- ./packages

cache_time.search: 10m
cache_time.categories: 10m
Expand Down
2 changes: 2 additions & 0 deletions testing/environments/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:
package-registry:
build: ../..
image: docker.elastic.co/package-registry/package-registry:master
volumes:
- ../../build/package-storage:/packages
ports:
- "127.0.0.1:8080:8080"

0 comments on commit 711bc76

Please sign in to comment.