Skip to content

Commit

Permalink
added -o for gid and given internal hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
AbduRawoof committed Dec 30, 2024
1 parent d4bce5c commit fc6aef4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
export NEW_IMAGE_URI="583275065488.dkr.ecr.us-east-2.amazonaws.com/catalog:$IMAGE_TAG"
echo "NEW_IMAGE_URI=$NEW_IMAGE_URI" >> $GITHUB_ENV
docker build --build-arg TOKEN=${{ secrets.TOKEN }} -f docker/Dockerfile -t test-catalog:$IMAGE_TAG .
docker build -f docker/Dockerfile -t test-catalog:$IMAGE_TAG .
docker tag test-catalog:$IMAGE_TAG $NEW_IMAGE_URI
Expand Down
40 changes: 20 additions & 20 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ ARG GIT_URL=https://github.com/rackerlabs/cloudfeeds-catalog.git
# ARG GIT_BRANCH="feature_containerization"
#ARG GIT_BRANCH="CF-3592-EC2-Image-Builder"
ARG GIT_BRANCH="CF-test-ci/cd"
ARG TOKEN

RUN mkdir -p /home/cl && \
cd /home && \
git clone -b ${GIT_BRANCH} https://${TOKEN}@${GIT_URL#https://} cl
# ARG TOKEN

# RUN mkdir -p /home/cl && \
# cd /home && \
# git clone -b ${GIT_BRANCH} ${GIT_URL} cl
# git clone -b ${GIT_BRANCH} https://${TOKEN}@${GIT_URL#https://} cl

RUN mkdir -p /home/cl && \
cd /home && \
git clone -b ${GIT_BRANCH} ${GIT_URL} cl


# ======================== Build cloudfeeds catalog using maven container image =======================
Expand Down Expand Up @@ -70,25 +70,25 @@ ENV SAXON_HOME=/etc/saxon \
SERVICE_PORT=${SERVICE_PORT:-$service_port}

# add non privileged user
RUN GID=1000; \
while getent group $GID > /dev/null; do GID=$((GID+1)); done && \
groupadd --gid $GID feeds && \
UID=1000; \
while getent passwd $UID > /dev/null; do UID=$((UID+1)); done && \
useradd -u $UID -g feeds feeds && \
mkdir -p /etc/cloudfeeds/translation/ && \
chown -R feeds:feeds "${CATALINA_HOME}" /etc/cloudfeeds/translation/ && \
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 && \
chown feeds:feeds /usr/local/bin/dumb-init && \
chmod u+x /usr/local/bin/dumb-init

# RUN groupadd --gid 1000 feeds && \
# useradd -u 1000 -g feeds feeds && \
# RUN GID=1000; \
# while getent group $GID > /dev/null; do GID=$((GID+1)); done && \
# groupadd --gid $GID feeds && \
# UID=1000; \
# while getent passwd $UID > /dev/null; do UID=$((UID+1)); done && \
# useradd -u $UID -g feeds feeds && \
# mkdir -p /etc/cloudfeeds/translation/ && \
# chown -R feeds:feeds "${CATALINA_HOME}" /etc/cloudfeeds/translation/ && \
# wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 && \
# chown feeds:feeds /usr/local/bin/dumb-init && \
# chmod u+x /usr/local/bin/dumb-init
# added -o flag infront on --gid and -u
RUN groupadd -o --gid 1000 feeds && \
useradd -o -u 1000 -g feeds feeds && \
mkdir -p /etc/cloudfeeds/translation/ && \
chown -R feeds:feeds "${CATALINA_HOME}" /etc/cloudfeeds/translation/ && \
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 && \
chown feeds:feeds /usr/local/bin/dumb-init && \
chmod u+x /usr/local/bin/dumb-init

WORKDIR ${CATALINA_HOME}

Expand Down
6 changes: 3 additions & 3 deletions docker/feedscatalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
And the parameter values will be changed according to the env.
-->
<environment>
<vipURL>https://abdu7511.internal.test.aws.cloudfeeds.rackspace.net</vipURL>
<externalVipURL>https://abdu7511.internal.test.aws.cloudfeeds.rackspace.net</externalVipURL>
<prefsSvcVipURL>https://abdu7511.internal.test.aws.cloudfeeds.rackspace.net</prefsSvcVipURL>
<vipURL>https://abdu7511.innternal.test.aws.cloudfeeds.rackspace.net</vipURL>
<externalVipURL>https://abdu7511.innternal.test.aws.cloudfeeds.rackspace.net</externalVipURL>
<prefsSvcVipURL>https://abdu7511.innternal.test.aws.cloudfeeds.rackspace.net</prefsSvcVipURL>
</environment>

0 comments on commit fc6aef4

Please sign in to comment.