Skip to content

Commit

Permalink
add memcached container files (#7307)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandeepsplaha authored Jan 22, 2024
1 parent 9740bd1 commit cc1b3c5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .pipelines/containerSourceData/memcached/Dockerfile-Memcached
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/memcached/memcached.pkg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
memcached
22 changes: 22 additions & 0 deletions .pipelines/containerSourceData/scripts/BuildGoldenContainers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -914,6 +932,10 @@ function start_building_containers {
create_azurecli_container
;;

"$MEMCACHED")
create_memcached_container
;;

"$NGINX")
create_nginx_container
;;
Expand Down

0 comments on commit cc1b3c5

Please sign in to comment.