1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-15 07:40:07 +02:00
copilot/packages/portal-api/test-Dockerfile

31 lines
919 B
Plaintext
Raw Normal View History

FROM node:8-alpine
# Install dependencies
RUN set -x \
&& apk update \
&& apk add --update curl bash build-base python zeromq-dev openssh \
&& apk upgrade \
&& rm -rf /var/cache/apk/*
# Install ContainerPilot
ENV CP_SHA1 8d680939a8a5c8b27e764d55a78f5e3ae7b42ef4
ENV CONTAINERPILOT_VERSION 3.3.3
RUN curl -Lo /tmp/containerpilot.tar.gz "https://github.com/joyent/containerpilot/releases/download/${CONTAINERPILOT_VERSION}/containerpilot-${CONTAINERPILOT_VERSION}.tar.gz" \
&& echo "${CP_SHA1} /tmp/containerpilot.tar.gz" | sha1sum -c \
&& tar zxf /tmp/containerpilot.tar.gz -C /bin \
&& rm /tmp/containerpilot.tar.gz
# Copy required files
RUN mkdir -p /opt/app/
COPY ./ /opt/app/
COPY test/containerpilot.json5 /etc/containerpilot.json5
COPY test/prestart.sh /bin/prestart.sh
ENV CONTAINERPILOT /etc/containerpilot.json5
# Install dependencies
WORKDIR /opt/app/
RUN npm install
CMD ["/bin/containerpilot"]