Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Switch to alpine as base docker image.

  • Loading branch information
vladaionescu committed Apr 21, 2016
1 parent 4105662 commit ef01a2396e176f7af34cad2475989f90ff5346f3
@@ -202,8 +202,9 @@ docker-images: $(DOCKER_TARGETS)
docker-%: $(SERVICES_DIR)/%/Dockerfile FORCE
$(DOCKER) build -t leveros/$(@:docker-%=%) $(dir $<)

docker-consul: | docker-ubuntubase
docker-leveroshost: | docker-ubuntubase
docker-consul: | docker-base
docker-leveroshost: | docker-base
docker-levercontainer: | docker-base
docker-leveroshost: $(SERVICES_DIR)/leveroshost/leveroshost
$(SERVICES_DIR)/leveroshost/leveroshost: $(BIN_DIR)/leveroshost
cp $< $@
@@ -8,5 +8,5 @@ docker run --rm --entrypoint "${entry_point}" \
-v "${PWD}/${1}:${entry_point}:ro" \
${EXTRA_DOCKER_ARGS} \
--net leveros_default \
leveros/ubuntubase:latest \
leveros/base:latest \
"${@:2}"
@@ -0,0 +1,7 @@
FROM alpine:3.3

LABEL com.leveros.isleveros="true"

RUN apk update && apk upgrade \
&& apk add bash ca-certificates \
&& rm -rf /var/cache/apk/*
@@ -1,8 +1,11 @@
FROM leveros/ubuntubase:latest
FROM leveros/base:latest

RUN apk add --update docker wget unzip \
&& rm -rf /var/cache/apk/*

# Install consul.
RUN bash -c "cd /usr/local/bin && wget https://releases.hashicorp.com/consul/0.6.3/consul_0.6.3_linux_amd64.zip && unzip consul_0.6.3_linux_amd64.zip && rm consul_0.6.3_linux_amd64.zip"
RUN bash -c "mkdir -p /consul/ui && cd /consul/ui && wget https://releases.hashicorp.com/consul/0.6.3/consul_0.6.3_web_ui.zip && unzip consul_0.6.3_web_ui.zip && rm consul_0.6.3_web_ui.zip"
RUN bash -c "cd /usr/local/bin && wget https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip && unzip consul_0.6.4_linux_amd64.zip && rm consul_0.6.4_linux_amd64.zip"
RUN bash -c "mkdir -p /consul/ui && cd /consul/ui && wget https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_web_ui.zip && unzip consul_0.6.4_web_ui.zip && rm consul_0.6.4_web_ui.zip"
RUN bash -c "mkdir -p /consul/data"

COPY conf.json /consul/conf/conf.json
@@ -1,39 +1,26 @@
FROM ubuntu:latest
FROM leveros/base:latest

LABEL com.leveros.isleveros="true"
LABEL com.leveros.islevercontainer="true"

RUN apt-get update
RUN apt-get dist-upgrade -y
RUN echo '@edge http://nl.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories
RUN echo '@community http://nl.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories

RUN apt-get install -y \
build-essential \
RUN apk add --update \
curl \
dialog \
git \
libevent-dev \
nano \
net-tools \
libevent \
make \
nodejs@edge \
python \
python-dev \
python-distribute \
python-pip \
python-software-properties \
software-properties-common \
tar \
unzip \
wget

# Install NodeJS.
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs
RUN rm -rf /var/cache/apk/*

# This is really important to avoid Lever customers from running as root.
# Without ns remap it would mean that in case of a breakout they would have
# root access to the host.
RUN groupadd -r lever
RUN useradd -g lever -s /sbin/nologin lever
RUN addgroup lever
RUN adduser -D -G lever -s /sbin/nologin lever
USER lever

# Port listening on for Lever RPCs.
@@ -1,4 +1,4 @@
FROM leveros/ubuntubase:latest
FROM leveros/base:latest

COPY ./leveroshost /leveros/bin/

This file was deleted.

0 comments on commit ef01a23

Please sign in to comment.
You can’t perform that action at this time.