Skip to content

Commit

Permalink
upgraded to the latest stable versions of awscli and nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinpan committed May 24, 2017
1 parent 4dc393d commit cc3f6da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
FROM nginx:1.11.10-alpine
FROM nginx:1.12.0-alpine

RUN apk -v --update add \
python \
py-pip \
groff \
less \
mailcap \
&& \
pip install --upgrade awscli s3cmd python-magic && \
pip install --upgrade pip awscli==1.11.92 && \
apk -v --purge del py-pip && \
rm /var/cache/apk/*

Expand Down
2 changes: 1 addition & 1 deletion configs/auth_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ nx_conf=/etc/nginx/nginx.conf

# update the auth token
auth=$(grep X-Forwarded-User ${nx_conf} | awk '{print $4}'| uniq|tr -d "\n\r")
token=$(aws ecr get-login | awk '{print $6}')
token=$(aws ecr get-login --no-include-email | awk '{print $6}')
auth_n=$(echo AWS:${token} | base64 |tr -d "[:space:]")

sed -i "s|${auth%??}|${auth_n}|g" ${nx_conf}
4 changes: 2 additions & 2 deletions configs/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ fi


# update the auth token
aws_cli_exec=$(aws ecr get-login)
aws_cli_exec=$(aws ecr get-login --no-include-email)
auth=$(grep X-Forwarded-User ${nx_conf} | awk '{print $4}'| uniq|tr -d "\n\r")
token=$(echo "${aws_cli_exec}" | awk '{print $6}')
auth_n=$(echo AWS:${token} | base64 |tr -d "[:space:]")
reg_url=$(echo "${aws_cli_exec}" | awk '{print $9}')
reg_url=$(echo "${aws_cli_exec}" | awk '{print $7}')

sed -i "s|${auth%??}|${auth_n}|g" ${nx_conf}
sed -i "s|REGISTRY_URL|$reg_url|g" ${nx_conf}
Expand Down

0 comments on commit cc3f6da

Please sign in to comment.