From 215b3d3475b333feeabdfa00451cc50caa7fdda5 Mon Sep 17 00:00:00 2001 From: SANDEEP KUMAR JAISAWAL Date: Wed, 29 Nov 2023 16:38:54 +0530 Subject: [PATCH] Adding docker file for CI build,Dir name changed Issue-Id: AIMLFW-64 Change-Id: I97e5a463993b3affbc37f7642731576a0503426a Signed-off-by: SANDEEP KUMAR JAISAWAL --- Dockerfile | 38 ++++++++++++++++++++++++++++++++++++++ logging/logging.go | 17 +++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ec2e804 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +# ================================================================================== +# +# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ================================================================================== +#Base Image +FROM golang:1.21 + +# location in the container +ENV MME_DIR /home/app/ +WORKDIR ${MME_DIR} + +# Copy sources into the container +COPY . . +# Install dependencies from go.mod +RUN go get + +#Build all packages from current dir into bin +RUN go build -o mme_bin . + +#Start the app +ENTRYPOINT [ "sh", "-c", "${MME_DIR}/mme_bin"] + +#Expose the ports for external communication +EXPOSE 8082 + diff --git a/logging/logging.go b/logging/logging.go index 47c6de4..5818827 100644 --- a/logging/logging.go +++ b/logging/logging.go @@ -1,3 +1,20 @@ +/* +================================================================================== +Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +================================================================================== +*/ package logging import ( -- 2.16.6