From f5a2813305e84ca83bcf607b36c2b638efbdd198 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Fri, 6 Sep 2024 15:52:41 -0700 Subject: [PATCH] Chore give docker image fullname (#119) * chore: docker-build uses full ghcr image name * chore: clean dockerignore file --- Dockerfile | 2 +- Dockerfile.dockerignore | 11 +++++++++-- Makefile | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd6979f..7b6f0e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY go.mod go.sum ./ # Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed RUN go mod download -# Copy the rest of the application code +# Copy the rest of the application code (filtered by .dockerignore) COPY . . # Build the application binary diff --git a/Dockerfile.dockerignore b/Dockerfile.dockerignore index 2c9b852..e219d3d 100644 --- a/Dockerfile.dockerignore +++ b/Dockerfile.dockerignore @@ -1,2 +1,9 @@ -!/go.mod -!/go.sum +# Ignore everything +* + +# Re-include necessary files only +!go.mod +!go.sum +!*/**/*.go +!Makefile +!resources diff --git a/Makefile b/Makefile index c5d889e..c2771c8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APP_NAME = eigenda-proxy +IMAGE_NAME = ghcr.io/layr-labs/eigenda-proxy LINTER_VERSION = v1.52.1 LINTER_URL = https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh GET_LINT_CMD = "curl -sSfL $(LINTER_URL) | sh -s -- -b $(go env GOPATH)/bin $(LINTER_VERSION)" @@ -21,7 +21,7 @@ eigenda-proxy: .PHONY: docker-build docker-build: - @docker build -t $(APP_NAME) . + @docker build -t $(IMAGE_NAME) . run-minio: docker run -p 4566:9000 -d -e "MINIO_ROOT_USER=minioadmin" -e "MINIO_ROOT_PASSWORD=minioadmin" --name minio minio/minio server /data