1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-05 12:44:54 +01:00

feat(image): Building project as a container image.

This commit is contained in:
Otávio Fernandes
2019-10-29 15:25:09 +01:00
parent 0b950e4c21
commit 551438e13b
2 changed files with 32 additions and 0 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
.*
_output/
docs/
examples/
images/
*.md
AUTHORS
LICENSE
OWNERS

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM openshift/origin-release:golang-1.13 AS builder
ENV S2I_GIT_VERSION="" \
S2I_GIT_MAJOR="" \
S2I_GIT_MINOR=""
ENV GOARCH="amd64"
COPY . $GOPATH/src/github.com/openshift/source-to-image
RUN cd $GOPATH/src/github.com/openshift/source-to-image && \
make && \
install _output/local/bin/linux/${GOARCH}/s2i /usr/local/bin
#
# Runner Image
#
FROM registry.redhat.io/ubi8/ubi
COPY --from=builder /usr/local/bin/s2i /usr/local/bin
ENTRYPOINT [ "/usr/local/bin/s2i" ]