chore: Simplified commands

This commit is contained in:
Maicol Battistini 2024-08-19 18:12:55 +02:00
parent 5b20fab5ee
commit 3309bed615
No known key found for this signature in database
2 changed files with 9 additions and 8 deletions

View File

@ -1,9 +1,12 @@
VERSION := $(shell git describe --tags --exact-match 2>/dev/null || echo latest) VERSION := 2.10.4-focal
DOCKERHUB_NAMESPACE ?= keitaro DOCKERHUB_NAMESPACE ?= d4science
IMAGE := ${DOCKERHUB_NAMESPACE}/ckan:${VERSION} IMAGE := ${DOCKERHUB_NAMESPACE}/ckan:${VERSION}
build: 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 push: build
docker push ${IMAGE} docker push ${IMAGE}

View File

@ -29,9 +29,7 @@ Directory layout:
## Running CKAN using docker-compose ## Running CKAN using docker-compose
To start CKAN using docker-compose, simply change into the *compose* directory and run To start CKAN using docker-compose, simply change into the *compose* directory and run
```sh ```sh
cd compose/2.10 make up
docker compose --env-file .docker.env build
docker compose --env-file .docker.env up
``` ```
Check if CKAN was succesfuly started on http://localhost:5000. 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 ## Build
To build a CKAN image run: To build a CKAN image run:
```sh ```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 ## Upload to DockerHub
>*It's recommended to upload built images to DockerHub* >*It's recommended to upload built images to DockerHub*