Verified Commit 876a7e46 authored by Yunus Sevinchan's avatar Yunus Sevinchan
Browse files

Update ccees/utopia dockerfile

- Install `make` additionally
- Use proper build context when building ccees/utopia image
parent 533864e5
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ variables:
  # UTOPIA_IMAGE_NAME: ccees/utopia
  # UTOPIA_IMAGE_REMOTE_URL: https://gitlab.com/utopia-project/utopia.git
  # UTOPIA_IMAGE_BRANCH: master
  # UTOPIA_IMAGE_BUILD_PROCNUM: 1
  # UTOPIA_IMAGE_BUILD_OPTIONS:

  # Docker Hub login command
@@ -131,7 +132,7 @@ image: ccees/utopia-base:latest
    - docker:dind
  variables:
    DOCKER_DRIVER: overlay2
    UTOPIA_IMAGE_BUILD_OPTIONS: --build-arg PROCNUM=$CPUS_DIND
    UTOPIA_IMAGE_BUILD_PROCNUM: $CPUS_DIND
  before_script:
    - docker info
    - $DOCKER_HUB_LOGIN
+5 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ UTOPIA_BASE_IMAGE_BUILD_OPTIONS ?=
UTOPIA_IMAGE_NAME ?= ccees/utopia
UTOPIA_IMAGE_REMOTE_URL ?= https://gitlab.com/utopia-project/utopia.git
UTOPIA_IMAGE_BRANCH ?= master
UTOPIA_IMAGE_BUILD_PROCNUM ?= 1
UTOPIA_IMAGE_BUILD_OPTIONS ?=

#
@@ -56,12 +57,14 @@ build_base_image:

build_utopia_image:
	@echo "Building Utopia docker image ..."
	docker build . \
		-f utopia.dockerfile \
	# Need to go to parent directory for this to have the proper build context
	cd ../ && docker build . \
		-f docker/utopia.dockerfile \
		-t $(UTOPIA_IMAGE) \
		--build-arg BASE_IMAGE=$(UTOPIA_BASE_IMAGE) \
		--build-arg GIT_REMOTE_URL=$(UTOPIA_IMAGE_REMOTE_URL) \
		--build-arg GIT_CHECKOUT=$(UTOPIA_IMAGE_BRANCH) \
		--build-arg PROCNUM=$(UTOPIA_IMAGE_BUILD_PROCNUM) \
		$(UTOPIA_IMAGE_BUILD_OPTIONS)
	@echo "Built Utopia docker image, tagged $(UTOPIA_IMAGE) ..."

+8 −1
Original line number Diff line number Diff line
@@ -21,7 +21,14 @@ ARG GIT_REMOTE_URL=""

# End of argument definitions . . . . . . . . . . . . . . . . . . . . . . . . .

# Enter a new work directory and copy over all data from the build context
# Need some additional packages
RUN    apt update \
    && apt install -y --no-install-recommends build-essential \
    && apt-get autoremove -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Copy over the whole repository from the build context
WORKDIR /utopia
COPY ./ ./