Skip to content

Commit

Permalink
add nodejs to base image
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Jul 10, 2023
1 parent fee60a1 commit 69f4a0a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 73 deletions.
57 changes: 2 additions & 55 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ jobs:

- name: Push image to ECR
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
docker buildx imagetools create \
--tag ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:latest \
--tag ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:$git_hash \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:latest
# disabled until we make it 100% reliable and add more meaningful tests
Expand Down Expand Up @@ -180,57 +181,3 @@ jobs:
folder: ${{ steps.extract.outputs.destination }}
bucket: windmill-frontend
bucket-region: us-east-1
publish_privately_heavy:
needs: [build_ee]
runs-on: [self-hosted, new]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker meta
id: meta-heavy
uses: docker/metadata-action@v4
with:
images: |
${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Login to ECR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.ECR_REGISTRY }}
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push privately
uses: docker/build-push-action@v4
if: github.event_name != 'pull_request'
with:
context: .
push: true
file: ./docker/DockerfileHeavy
tags: |
${{ steps.meta-heavy.outputs.tags }}
labels: ${{ steps.meta-heavy.outputs.labels }}
cache-from:
type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME
}}-heavy:buildcache
cache-to:
type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME
}}-heavy:buildcache,mode=max
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,14 @@ RUN apt-get update \

RUN arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
wget https://get.helm.sh/helm-v3.12.0-linux-$arch.tar.gz && \
tar -zxvf helm-v3.10.1-linux-amd64.tar.gz && \
mv linux-amd64/helm /usr/local/bin/helm &&\
tar -zxvf helm-v3.12.0-linux-$arch.tar.gz && \
mv linux-$arch/helm /usr/local/bin/helm &&\
chmod +x /usr/local/bin/helm

RUN arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
curl -LO "https://dl.k8s.io/release/v1.27.2/bin/linux/$arch/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

RUN arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
curl -LO "https://dl.k8s.io/release/v1.27.2/bin/linux/$arch/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

RUN set -eux; \
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
case "$arch" in \
Expand All @@ -123,7 +119,10 @@ RUN set -eux; \
esac; \
apt-get update && apt install unzip && curl "https://awscli.amazonaws.com/$zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && rm $zip
./aws/install && rm awscliv2.zip

RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &&\
apt-get install -y nodejs

RUN arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
curl -o rclone.zip "https://downloads.rclone.org/v1.60.1/rclone-v1.60.1-linux-$arch.zip"; \
Expand Down
11 changes: 0 additions & 11 deletions docker/DockerfileHeavy

This file was deleted.

0 comments on commit 69f4a0a

Please sign in to comment.