Skip to content

Commit

Permalink
[MOSIP-32462] corrected apline install and create user commands.
Browse files Browse the repository at this point in the history
Signed-off-by: Mahammed Taheer <[email protected]>
  • Loading branch information
mahammedtaheer committed May 1, 2024
1 parent c3635d1 commit 0472b7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
12 changes: 6 additions & 6 deletions kernel/kernel-keymanager-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ ARG hsm_local_dir=hsm-client
ENV hsm_local_dir_name=${hsm_local_dir}

# install packages and create user
RUN apt-get -y update \
&& apt-get install -y unzip sudo\
&& groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \
&& adduser ${container_user} sudo \
&& echo "%sudo ALL=(ALL) NOPASSWD:/home/${container_user}/${hsm_local_dir}/install.sh" >> /etc/sudoers
RUN apk update \
&& apk add unzip sudo\
&& addgroup -g ${container_user_gid} -S ${container_user_group} \
&& adduser -u ${container_user_uid} -G ${container_user_group} -S ${container_user} -h ${container_user} --disabled-password \
&& $USER \
&& sudo echo "%sudo ALL=(ALL) NOPASSWD:/home/${container_user}/${hsm_local_dir}/install.sh" >> /etc/sudoers

# set working directory for the user
WORKDIR /home/${container_user}
Expand Down
5 changes: 2 additions & 3 deletions kernel/keys-generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ LABEL commit_hash=${COMMIT_HASH}
LABEL commit_id=${COMMIT_ID}
LABEL build_time=${BUILD_TIME}

RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install unzip
RUN apk update \
&& apk add unzip

# can be passed during Docker build as build time environment for github branch to pickup configuration from.
ARG spring_config_label
Expand Down
5 changes: 2 additions & 3 deletions kernel/keys-migrator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ LABEL commit_hash=${COMMIT_HASH}
LABEL commit_id=${COMMIT_ID}
LABEL build_time=${BUILD_TIME}

RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install unzip
RUN apk update \
&& apk add unzip

# can be passed during Docker build as build time environment for github branch to pickup configuration from.
ARG spring_config_label
Expand Down

0 comments on commit 0472b7e

Please sign in to comment.