Skip to content

Commit

Permalink
feat(docker): Alpine - initial support for Cube Store
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Feb 22, 2021
1 parent f45e875 commit 6a48bcd
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
],
"command": {
"bootstrap": {
"npmClient": "yarn",
"npmClientArgs": [
"--frozen-lockfile"
]
Expand Down
21 changes: 19 additions & 2 deletions packages/cubejs-docker/dev-alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.20.1-alpine
FROM node:12.20.1-alpine3.12

ARG IMAGE_VERSION=dev

Expand All @@ -8,10 +8,27 @@ ENV CI=0

RUN apk add rxvt-unicode

# Cube Store dosnt ship musl build now, let's use build glibc in alpine (which is using musl)
# Probably in near feature we will finish musl builds, but for now I dont know the way. Do you know the way?
ENV PKG_GLIBC_VERSION 2.32-r0
ENV LANG=C.UTF-8

RUN apk add --update --no-cache libstdc++6 curl \
&& cd /tmp \
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& curl -L https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${PKG_GLIBC_VERSION}/glibc-${PKG_GLIBC_VERSION}.apk -o glibc.apk \
&& curl -L https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${PKG_GLIBC_VERSION}/glibc-bin-${PKG_GLIBC_VERSION}.apk -o glibc-bin.apk \
&& curl -L https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${PKG_GLIBC_VERSION}/glibc-i18n-${PKG_GLIBC_VERSION}.apk -o glibc-i18n.apk \
&& apk add glibc.apk glibc-bin.apk glibc-i18n.apk \
&& apk del curl \
&& rm glibc.apk glibc-bin.apk glibc-i18n.apk

# For now Cube.js docker image is building without waiting cross jobs, it's why we are not able to install it
ENV CUBESTORE_SKIP_POST_INSTALL=true
ENV TERM rxvt-unicode
ENV NODE_ENV production
# Very strange issue with error Command "lerna" not found.
# I dont have ideas, what is going wrong hear, but let's comment it for now, because it's dev image
#ENV NODE_ENV production

WORKDIR /cubejs

Expand Down
15 changes: 15 additions & 0 deletions packages/cubejs-docker/latest-alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ ENV CUBEJS_DOCKER_IMAGE_TAG=alpine

RUN apk add rxvt-unicode

# Cube Store dosnt ship musl build now, let's use build glibc in alpine (which is using musl)
# Probably in near feature we will finish musl builds, but for now I dont know the way. Do you know the way?
ENV PKG_GLIBC_VERSION 2.32-r0
ENV LANG=C.UTF-8

RUN apk add --update --no-cache libstdc++6 curl \
&& cd /tmp \
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& curl -L https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${PKG_GLIBC_VERSION}/glibc-${PKG_GLIBC_VERSION}.apk -o glibc.apk \
&& curl -L https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${PKG_GLIBC_VERSION}/glibc-bin-${PKG_GLIBC_VERSION}.apk -o glibc-bin.apk \
&& curl -L https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${PKG_GLIBC_VERSION}/glibc-i18n-${PKG_GLIBC_VERSION}.apk -o glibc-i18n.apk \
&& apk add glibc.apk glibc-bin.apk glibc-i18n.apk \
&& apk del curl \
&& rm glibc.apk glibc-bin.apk glibc-i18n.apk

# For now Cube.js docker image is building without waiting cross jobs, it's why we are not able to install it
ENV CUBESTORE_SKIP_POST_INSTALL=true
ENV TERM rxvt-unicode
Expand Down

0 comments on commit 6a48bcd

Please sign in to comment.