Merge branch 'feature/smaller-docker-image' into 'dev'

Feature/smaller docker image

See merge request ligolang/ligo!185
This commit is contained in:
Matej Šima 2019-11-09 22:34:20 +00:00
commit d0c0fcff14
6 changed files with 17 additions and 12 deletions

View File

@ -1,4 +1,3 @@
dist
_opam
_build
docker

View File

@ -5,10 +5,10 @@ variables:
package_binary_script: "./scripts/distribution/generic/package.sh"
stages:
- build_docker
- test
- build_and_deploy_docker
- build_and_package_binaries
- build_docker
- build_and_deploy_docker
- build_and_deploy_website
.build_binary: &build_binary
@ -19,9 +19,6 @@ stages:
artifacts:
paths:
- dist/package/**/*
only:
- master
- dev
.website_build: &website_build
stage: build_and_deploy_website
@ -92,6 +89,8 @@ local-dune-job:
# Run a docker build without publishing to the registry
build-current-docker-image:
stage: build_docker
dependencies:
- build-and-package-debian-10
<<: *docker
script:
- sh scripts/build_docker_image.sh
@ -105,6 +104,8 @@ build-current-docker-image:
build-and-publish-latest-docker-image:
stage: build_and_deploy_docker
<<: *docker
dependencies:
- build-and-package-debian-10
script:
- sh scripts/build_docker_image.sh
- sh scripts/test_cli.sh

4
dist/.gitignore vendored
View File

@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -0,0 +1,9 @@
FROM jgoerzen/debian-base-minimal:buster
COPY ./dist/package/debian-10 /package/dist
RUN apt-get update -qq
RUN apt-get -y -f install "/package/dist/$(ls /package/dist)"
RUN rm -r /package/dist
ENTRYPOINT [ "ligo" ]

View File

@ -19,7 +19,7 @@ RUN echo "Package: ligo\n\
Version: $version\n\
Architecture: all\n\
Maintainer: info@ligolang.org\n\
Depends: libev-dev, perl, pkg-config, libgmp-dev, libhidapi-dev, m4, libcap-dev, bubblewrap, rsync\n\
Depends: libev4, libgmp10, libgmpxx4ldbl, cpp\n\
Homepage: http://ligolang.org\n\
Description: LIGO is a statically typed high-level smart-contract language that compiles down to Michelson." >> /package/DEBIAN/control

View File

@ -1,3 +1,3 @@
#!/bin/sh
set -e
docker build --build-arg target="4.07" -t "${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:next" -f ./docker/distribution/generic/build.Dockerfile .
docker build -t "${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:next" -f ./docker/distribution/debian/distribute.Dockerfile .