Skip to content

Commit

Permalink
Docker image building (#1436)
Browse files Browse the repository at this point in the history
* update docker image
  • Loading branch information
himadrisingh committed Dec 16, 2022
1 parent bacbcdc commit f931c44
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
echo '${{ secrets.RILL_BINARY_SA }}' > rill-binary-sa.json
echo 'GITHUB_TOKEN=${{ secrets.GORELEASER_ACCESS_TOKEN }}' > .release-env
echo 'GOOGLE_APPLICATION_CREDENTIALS=/rill-binary-sa.json' >> .release-env
echo 'DOCKERHUB_USER=${{ secrets.DOCKERHUB_USER }}' >> .release-env
echo 'DOCKERHUB_PASS=${{ secrets.DOCKERHUB_PASS }}' >> .release-env
- name: Release Publish
run: |-
Expand Down
9 changes: 9 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ release:
prerelease: auto
draft: false

before:
hooks:
- echo ${{ .Env.DOCKERHUB_PASS }} | docker login -u ${{ .Env.DOCKERHUB_USER }} --password-stdin

builds:
- id: darwin_amd64
main: ./cli/main.go
Expand Down Expand Up @@ -90,6 +94,11 @@ brews:
name: rilldata
email: [email protected]

dockers:
- image_templates:
- rilldata/rill:latest
- rilldata/rill:{{ .Tag }}

archives:
- files:
- README.md
Expand Down
36 changes: 5 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,10 @@
# syntax = docker/dockerfile:1.1-experimental
FROM ubuntu:focal

WORKDIR /app
RUN apt-get update && apt-get install -y ca-certificates

RUN apt-get update && apt-get install -y curl unzip make g++
COPY rill /usr/local/bin
RUN chmod 777 /usr/local/bin/rill

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

COPY package.json package-lock.json tsconfig.json ./
COPY web-local/package.json web-local/tsconfig.json web-local/tsconfig.node.json \
web-local/svelte.config.js web-local/vite.config.ts \
web-local/tailwind.config.cjs web-local/postcss.config.cjs web-local/.babelrc web-local/
COPY web-common/package.json web-common/orval.config.ts web-common/

COPY build-tools build-tools/
COPY web-local/build-tools web-local/build-tools/
COPY web-local/src web-local/src/
COPY web-common/src web-common/src/

RUN echo "Installing npm dependencies..." && \
npm install -d

COPY web-local/static web-local/static/
RUN echo "Compiling the code..." && \
npm run build

RUN echo "CommonJS voodoo" && \
node build-tools/replace_package_type.cjs module commonjs

RUN echo '#!/bin/bash\nnode web-local/dist/web-local/src/cli/data-modeler-cli.js "$@"' > /usr/bin/rill && \
chmod +x /usr/bin/rill

COPY scripts/entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh
ENTRYPOINT ["rill"]
CMD ["start"]
14 changes: 0 additions & 14 deletions scripts/entrypoint.sh

This file was deleted.

0 comments on commit f931c44

Please sign in to comment.