Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Dockerfile: upgrade to go 1.12.10 and reduce layer churn around packages #986

Merged
merged 1 commit into from
Oct 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@
# ORC_USER (default: orc_server_user): username used to login to orchestrator backend MySQL server
# ORC_PASSWORD (default: orc_server_password): password used to login to orchestrator backend MySQL server

FROM golang:1.12.6-alpine3.9
FROM golang:1.12.10-alpine3.10 as build

ENV GOPATH=/tmp/go

RUN apk update
RUN apk upgrade
RUN apk add --update libcurl
RUN apk add --update rsync
RUN apk add --update gcc
RUN apk add --update g++
RUN apk add --update build-base
RUN apk add --update bash
RUN apk add --update git
RUN apk --no-cache add libcurl rsync gcc g++ build-base bash git

RUN mkdir -p $GOPATH/src/github.com/github/orchestrator
WORKDIR $GOPATH/src/github.com/github/orchestrator
Expand All @@ -38,15 +30,13 @@ RUN cp conf/orchestrator-sample-sqlite.conf.json /etc/orchestrator.conf.json

FROM alpine:3.8

RUN apk add --no-cache bash
RUN apk add --no-cache curl
RUN apk add --no-cache jq
RUN apk --no-cache add bash curl jq

EXPOSE 3000

COPY --from=0 /usr/local/orchestrator /usr/local/orchestrator
COPY --from=0 /usr/bin/orchestrator-client /usr/bin/orchestrator-client
COPY --from=0 /etc/orchestrator.conf.json /etc/orchestrator.conf.json
COPY --from=build /usr/local/orchestrator /usr/local/orchestrator
COPY --from=build /usr/bin/orchestrator-client /usr/bin/orchestrator-client
COPY --from=build /etc/orchestrator.conf.json /etc/orchestrator.conf.json

WORKDIR /usr/local/orchestrator
ADD docker/entrypoint.sh /entrypoint.sh
Expand Down