Commit 77442eb1 authored by Diego Molteni's avatar Diego Molteni
Browse files

fixed docker images

parent 327d65e9
Pipeline #39352 failed with stages
in 14 minutes and 25 seconds
......@@ -16,10 +16,23 @@
# [seistore builder image]
ARG docker_node_image_version=14-alpine
# use ubuntu as base image
FROM ubuntu:bionic
FROM node:${docker_node_image_version} as runtime-builder
# nodejs version
ARG nodesecure_version=10
RUN apk --no-cache add --virtual native-deps g++ gcc libgcc libstdc++ linux-headers make python \
&& npm install --quiet node-gyp -g \
&& apk del native-deps
\ No newline at end of file
# update package list and install required packages
RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -y gnupg
RUN apt-get install -y git
# setup node from secure package
RUN curl -sL https://deb.nodesource.com/setup_${nodesecure_version}.x -o tmp/nodesource_setup.sh
RUN bash tmp/nodesource_setup.sh
RUN rm -f tmp/nodesource_setup.sh
# install nodejs and typescript globally
RUN apt-get update && apt-get install -y nodejs
RUN npm install -g typescript
......@@ -15,20 +15,21 @@
# ============================================================================
ARG docker_node_image_version=14-alpine
ARG docker_builder_image
# -------------------------------
# Compilation stage
# -------------------------------
FROM ${docker_builder_image} as runtime-builder
FROM node:${docker_node_image_version} as runtime-builder
ADD ./ /service
WORKDIR /service
RUN pm run clean \
RUN apk --no-cache add --virtual native-deps g++ gcc libgcc libstdc++ linux-headers make python \
&& npm install --quiet node-gyp -g \
&& npm install --quiet \
&& npm run build \
&& mkdir artifact \
&& cp -r package.json npm-shrinkwrap.json dist artifact
&& cp -r package.json npm-shrinkwrap.json dist artifact \
&& apk del native-deps
# -------------------------------
# Package stage
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment