From 959077f061d06797a3aea84116182939067b223a Mon Sep 17 00:00:00 2001
From: Luis Paolini <paoliniluis@gmail.com>
Date: Sun, 4 Apr 2021 14:12:44 -0300
Subject: [PATCH] Fix ee Dockerhub build (#15449)

* Fix EE Dockerhub for once and for all

* Try to overload the ARG attribute

* Kick the CI
---
 Dockerfile  |  4 ----
 hooks/build | 11 +++++++++++
 2 files changed, 11 insertions(+), 4 deletions(-)
 create mode 100644 hooks/build

diff --git a/Dockerfile b/Dockerfile
index a5b3b7019f4..a732e15e337 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,8 +4,6 @@
 
 FROM node:12.20.1-alpine as frontend
 
-ARG MB_EDITION=oss
-
 WORKDIR /app/source
 
 ENV FC_LANG en-US LC_CTYPE en_US.UTF-8
@@ -20,8 +18,6 @@ RUN yarn install --frozen-lockfile
 
 FROM adoptopenjdk/openjdk11:alpine as backend
 
-ARG MB_EDITION=oss
-
 WORKDIR /app/source
 
 ENV FC_LANG en-US LC_CTYPE en_US.UTF-8
diff --git a/hooks/build b/hooks/build
new file mode 100644
index 00000000000..7216e72ef78
--- /dev/null
+++ b/hooks/build
@@ -0,0 +1,11 @@
+#!/bin/bash
+# for posterity
+# SOURCE_BRANCH: the name of the branch or the tag that is currently being tested.
+# SOURCE_COMMIT: the SHA1 hash of the commit being tested.
+# COMMIT_MSG: the message from the commit being tested and built.
+# DOCKER_REPO: the name of the Docker repository being built.
+# DOCKERFILE_PATH: the dockerfile currently being built.
+# DOCKER_TAG: the Docker repository tag being built.
+# IMAGE_NAME: the name and tag of the Docker repository being built. (This variable is a combination of DOCKER_REPO:DOCKER_TAG.)
+
+docker build -t $IMAGE_NAME --build-arg MB_EDITION=$MB_EDITION .
\ No newline at end of file
-- 
GitLab