Skip to content

Commit

Permalink
install docker cli into image (#2171)
Browse files Browse the repository at this point in the history
* install docker cli into image

* changed default branch
  • Loading branch information
killmeplz authored Feb 17, 2022
1 parent 0272e1b commit b8b44ca
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/zk-environment.publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: publish zk-environment docker image

on:
pull_request:
branches:
- dev
types: [closed]
paths:
- 'docker/zk-environment/Dockerfile'
- '.github/workflows/zk-environment.publish.yml'
workflow_dispatch:
branches:
- 'dev'

jobs:
push_to_registry:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
name: Push Docker image to Docker Hub
runs-on: [self-hosted, ci-runner]
steps:
- uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/[email protected]
with:
push: true
tags: "matterlabs/zk-environment:latest"
file: docker/zk-environment/Dockerfile
no-cache: true
5 changes: 5 additions & 0 deletions docker/zk-environment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ WORKDIR /usr/src/zksync
# Install required dependencies
RUN apt-get update; apt-get install -y make bash git openssl libssl-dev gcc g++ curl libpq-dev pkg-config software-properties-common jq

#install docker engine
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
RUN apt update; apt install -y docker-ce-cli

# Install node and yarn
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
Expand Down

0 comments on commit b8b44ca

Please sign in to comment.