add memcached container files (#7307)

This commit is contained in:
Mandeep Plaha 2024-01-22 12:29:45 -08:00 committed by GitHub
parent 9740bd10e5
commit cc1b3c5c18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
ARG BASE_IMAGE
FROM $BASE_IMAGE
@INCLUDE_MAIN_RUN_INSTRUCTION@
RUN useradd memcache
USER memcache
EXPOSE 11211
# basic smoke test
RUN memcached -h
# set default command for the container
CMD ["memcached"]

View File

@ -0,0 +1 @@
memcached

View File

@ -62,6 +62,7 @@ readonly CERT_MANAGER='cert-manager'
readonly CERT_MANAGER_NO_DASH='certmanager'
readonly INFLUX_DB="influxdb"
readonly KUBEVIRT_BASE_COMPONENT="kubevirt"
readonly MEMCACHED="memcached"
readonly MULTUS="multus"
readonly NGINX="nginx"
readonly NODEJS="nodejs"
@ -492,6 +493,23 @@ function create_azurecli_container {
"$base_container_name/$AZURECLI"
}
# Creates memcached container
function create_memcached_container {
local pkgsFileName="$MEMCACHED.pkg"
local packagesToInstall=()
getPkgsFromFile $MEMCACHED $pkgsFileName packagesToInstall
local packages="${packagesToInstall[*]}"
CreateGoldenContainer \
"$MEMCACHED" \
"$MEMCACHED" \
"$base_container_name" \
"$base_container_tag" \
"$packages" \
"Dockerfile-Memcached" \
1 \
"$base_container_name/$MEMCACHED"
}
# Creates nginx container
function create_nginx_container {
local pkgsFileName="$NGINX.pkg"
@ -914,6 +932,10 @@ function start_building_containers {
create_azurecli_container
;;
"$MEMCACHED")
create_memcached_container
;;
"$NGINX")
create_nginx_container
;;