From 3309bed61549f6819f590dbb7614d5eb0f322397 Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Mon, 19 Aug 2024 18:12:55 +0200 Subject: [PATCH] chore: Simplified commands --- Makefile | 9 ++++++--- README.md | 8 +++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 903797e..8e070e8 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ -VERSION := $(shell git describe --tags --exact-match 2>/dev/null || echo latest) -DOCKERHUB_NAMESPACE ?= keitaro +VERSION := 2.10.4-focal +DOCKERHUB_NAMESPACE ?= d4science IMAGE := ${DOCKERHUB_NAMESPACE}/ckan:${VERSION} build: - docker build -t ${IMAGE} rootfs + DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build --tag ${IMAGE} images/ckan/2.10 + +up: + cd compose/2.10 && docker compose --env-file .docker.env up --build -d push: build docker push ${IMAGE} diff --git a/README.md b/README.md index 437e166..6e88e55 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,7 @@ Directory layout: ## Running CKAN using docker-compose To start CKAN using docker-compose, simply change into the *compose* directory and run ```sh -cd compose/2.10 -docker compose --env-file .docker.env build -docker compose --env-file .docker.env up +make up ``` Check if CKAN was succesfuly started on http://localhost:5000. @@ -94,9 +92,9 @@ You can add scripts to CKAN custom images and copy them to the *docker-afterinit ## Build To build a CKAN image run: ```sh -DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build --tag d4science-ckan:2.10.4-focal images/ckan/2.10 +make build ``` -The `–-tag d4science-ckan:2.10.4-focal` flag sets the image name to d4science-ckan:2.10.4-focal and 'images/ckan/2.10' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are. +In the makefile, The `–-tag d4science-ckan:2.10.4-focal` flag sets the image name to d4science-ckan:2.10.4-focal and 'images/ckan/2.10' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are. ## Upload to DockerHub >*It's recommended to upload built images to DockerHub*