mirror of https://github.com/apache/superset.git
fix: Updating Dockerfile to work with updated python requirements. (#10550)
* Updating Dockerfile to work with updated python requirements. * Adding a Docker build step to CI workflow * Trying docker build-push * Linting Dockerfile-dev * Switching to dev dockerfile
This commit is contained in:
parent
fb051e9a51
commit
5a908d4513
|
@ -0,0 +1,22 @@
|
||||||
|
name: DOCKER
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run local registry
|
||||||
|
run: docker run -d -p 5000:5000 registry:2
|
||||||
|
|
||||||
|
- name: Build and push Docker images
|
||||||
|
uses: docker/build-push-action@v1
|
||||||
|
with:
|
||||||
|
dockerfile: Dockerfile-dev
|
||||||
|
registry: localhost:5000
|
||||||
|
repository: temp/workflow
|
||||||
|
tags: foo
|
15
Dockerfile
15
Dockerfile
|
@ -27,12 +27,17 @@ RUN mkdir /app \
|
||||||
build-essential \
|
build-essential \
|
||||||
default-libmysqlclient-dev \
|
default-libmysqlclient-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
|
libsasl2-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# First, we just wanna install requirements, which will allow us to utilize the cache
|
# First, we just wanna install requirements, which will allow us to utilize the cache
|
||||||
# in order to only build if and only if requirements change
|
# in order to only build if and only if requirements change
|
||||||
COPY ./requirements/*.txt /app/
|
COPY ./requirements/*.txt /app/requirements/
|
||||||
|
COPY setup.py MANIFEST.in README.md /app/
|
||||||
|
COPY superset-frontend/package.json /app/superset-frontend/
|
||||||
RUN cd /app \
|
RUN cd /app \
|
||||||
|
&& mkdir -p superset/static \
|
||||||
|
&& touch superset/static/version_info.json \
|
||||||
&& pip install --no-cache -r requirements/local.txt
|
&& pip install --no-cache -r requirements/local.txt
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,13 +119,11 @@ ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||||
######################################################################
|
######################################################################
|
||||||
FROM lean AS dev
|
FROM lean AS dev
|
||||||
|
|
||||||
COPY ./requirements/*.txt ./docker/requirements/ /app/
|
COPY ./requirements/*.txt ./docker/requirements-*.txt/ /app/requirements/
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
# Cache everything for dev purposes...
|
# Cache everything for dev purposes...
|
||||||
RUN cd /app \
|
RUN cd /app \
|
||||||
&& pip install --ignore-installed -e . \
|
&& pip install --no-cache -r requirements/docker.txt \
|
||||||
&& pip install --ignore-installed -r requirements/local.txt \
|
&& pip install --no-cache -r requirements/requirements-local.txt || true
|
||||||
&& pip install --ignore-installed -r requirements-extra.txt \
|
|
||||||
&& pip install --ignore-installed -r requirements-local.txt || true
|
|
||||||
USER superset
|
USER superset
|
||||||
|
|
|
@ -20,12 +20,11 @@
|
||||||
######################################################################
|
######################################################################
|
||||||
FROM preset/superset:dev
|
FROM preset/superset:dev
|
||||||
|
|
||||||
COPY ./requirements/*.txt ./docker/requirements* /app/
|
COPY ./requirements/*.txt ./docker/requirements-*.txt/ /app/requirements/
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
# Cache everything for dev purposes...
|
||||||
RUN cd /app \
|
RUN cd /app \
|
||||||
&& pip install -e . \
|
&& pip install --no-cache -r requirements/docker.txt \
|
||||||
&& pip install --no-cache -r requirements/local.txt \
|
&& pip install --no-cache -r requirements/requirements-local.txt || true
|
||||||
&& pip install --no-cache -r requirements-extra.txt \
|
|
||||||
&& pip install --no-cache -r requirements-local.txt || true
|
|
||||||
USER superset
|
USER superset
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
gevent==1.4.0
|
-r base.in
|
||||||
psycopg2-binary==2.8.5
|
gevent
|
||||||
redis==3.2.1
|
psycopg2-binary
|
||||||
|
redis
|
|
@ -0,0 +1,17 @@
|
||||||
|
# SHA1:54074dcfe0a3bf83a9f4f8e2fb9d24746a86b50c
|
||||||
|
#
|
||||||
|
# This file is autogenerated by pip-compile-multi
|
||||||
|
# To update, run:
|
||||||
|
#
|
||||||
|
# pip-compile-multi
|
||||||
|
#
|
||||||
|
-r base.txt
|
||||||
|
-e file:. # via -r base.in
|
||||||
|
gevent==20.6.2 # via -r docker.in
|
||||||
|
greenlet==0.4.16 # via gevent
|
||||||
|
redis==3.5.3 # via -r docker.in
|
||||||
|
zope.event==4.4 # via gevent
|
||||||
|
zope.interface==5.1.0 # via gevent
|
||||||
|
|
||||||
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
|
# setuptools
|
Loading…
Reference in New Issue