Skip to content

Commit

Permalink
Merge pull request #2 from headout/Dockerfile-clean
Browse files Browse the repository at this point in the history
clean Dockerfile and lib fix
  • Loading branch information
im-Amitto authored Feb 18, 2023
2 parents 8728883 + 7469cb6 commit f2f6cff
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,40 @@ ENV BASE_URL="https://get.helm.sh"
ENV HELM_2_FILE="helm-v2.17.0-linux-amd64.tar.gz"
ENV HELM_3_FILE="helm-v3.8.0-linux-amd64.tar.gz"

RUN apk add --no-cache ca-certificates \
--repository http://dl-3.alpinelinux.org/alpine/edge/community/ \
jq curl bash nodejs aws-cli && \
apk add --no-cache aws-cli && \
apk add --no-cache \
python3 \
py3-pip \
&& pip3 install --upgrade pip \
&& pip3 install --no-cache-dir \
awscli \
&& rm -rf /var/cache/apk/* && \
# Install helm version 2:
curl -L ${BASE_URL}/${HELM_2_FILE} |tar xvz && \
# Install basic linux tools
RUN apk add --no-cache ca-certificates jq curl bash

# Install node and deps
RUN apk add --no-cache nodejs

# Install Aws CLI
RUN apk add --no-cache aws-cli

# Install Python3
RUN apk add --no-cache python3 py3-pip

# Install Python deps
RUN pip3 install --upgrade pip

# Install helm version 2
RUN curl -L ${BASE_URL}/${HELM_2_FILE} |tar xvz && \
mv linux-amd64/helm /usr/bin/helm && \
chmod +x /usr/bin/helm && \
rm -rf linux-amd64 && \
# Install helm version 3:
curl -L ${BASE_URL}/${HELM_3_FILE} |tar xvz && \
rm -rf linux-amd64

# Install helm version 3:
RUN curl -L ${BASE_URL}/${HELM_3_FILE} |tar xvz && \
mv linux-amd64/helm /usr/bin/helm3 && \
chmod +x /usr/bin/helm3 && \
rm -rf linux-amd64 && \
# Init version 2 helm:
helm init --client-only
rm -rf linux-amd64

# Init version 2 helm:
RUN helm init --client-only

# Setup Python path variable
ENV PYTHONPATH "/usr/lib/python3.8/site-packages/"

# Copy node_modules and charts to src
COPY . /usr/src/
ENTRYPOINT ["node", "/usr/src/index.js"]

ENTRYPOINT ["node", "/usr/src/index.js"]

0 comments on commit f2f6cff

Please sign in to comment.