This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
WIP Initial api server #1
Open
alexeykazakov
wants to merge
7
commits into
redhat-developer:master
Choose a base branch
from
alexeykazakov:initial
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7ece9eb
Initial app server
alexeykazakov f6b6a50
Fix build
alexeykazakov 1016463
Rename API group
alexeykazakov b4c44c0
Rename PocServer to GitAPIServer
alexeykazakov 2739f08
Move cmd
alexeykazakov e38db67
Cleanup
alexeykazakov b11eebe
Address review comments
alexeykazakov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,8 @@ | |
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
/vendor | ||
/.idea | ||
/bin | ||
/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM centos:7 | ||
LABEL maintainer "Devtools <[email protected]>" | ||
LABEL author "Devtools <[email protected]>" | ||
ENV LANG=en_US.utf8 | ||
ARG USE_GO_VERSION_FROM_WEBSITE=0 | ||
|
||
# Some packages might seem weird but they are required by the RVM installer. | ||
RUN yum install epel-release -y \ | ||
&& yum --enablerepo=centosplus --enablerepo=epel install -y \ | ||
findutils \ | ||
git \ | ||
$(test "$USE_GO_VERSION_FROM_WEBSITE" != 1 && echo "golang") \ | ||
make \ | ||
procps-ng \ | ||
tar \ | ||
wget \ | ||
which \ | ||
&& yum clean all | ||
|
||
RUN if [[ "$USE_GO_VERSION_FROM_WEBSITE" = 1 ]]; then cd /tmp \ | ||
&& wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz \ | ||
&& echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.10.linux-amd64.tar.gz" > checksum \ | ||
&& sha256sum -c checksum \ | ||
&& tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz \ | ||
&& rm -f go1.10.linux-amd64.tar.gz; \ | ||
fi | ||
ENV PATH=$PATH:/usr/local/go/bin | ||
|
||
# Get dep for Go package management and make sure the directory has full rwz permissions for non-root users | ||
ENV GOPATH /tmp/go | ||
RUN mkdir -p $GOPATH/bin && chmod a+rwx $GOPATH | ||
RUN cd $GOPATH/bin \ | ||
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o dep \ | ||
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep" > dep-linux-amd64.sha256 \ | ||
sha256sum -c dep-linux-amd64.sha256 | ||
|
||
ENTRYPOINT ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM centos:7 | ||
LABEL maintainer "Devtools <[email protected]>" | ||
LABEL author "Devtools <[email protected]>" | ||
ENV LANG=en_US.utf8 | ||
ENV INSTALL_PREFIX=/usr/local/git-service | ||
|
||
# Create a non-root user and a group with the same name: "devconsole-operator" | ||
ENV USER_NAME=devconsole-operator | ||
RUN useradd --no-create-home -s /bin/bash ${USER_NAME} | ||
|
||
COPY bin/git-service ${INSTALL_PREFIX}/bin/git-service | ||
|
||
# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user | ||
USER ${USER_NAME} | ||
|
||
WORKDIR ${INSTALL_PREFIX} | ||
|
||
ENTRYPOINT [ "bin/git-service" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM quay.io/openshiftio/rhel-base-golang:latest | ||
|
||
LABEL maintainer "Devtools <[email protected]>" | ||
LABEL author "Devtools <[email protected]>" | ||
ENV LANG=en_US.utf8 | ||
ENV INSTALL_PREFIX=/usr/local/git-service | ||
|
||
# Create a non-root user and a group with the same name: "devconsole-operator" | ||
ENV USER_NAME=devconsole-operator | ||
RUN useradd --no-create-home -s /bin/bash ${USER_NAME} | ||
|
||
COPY bin/git-service ${INSTALL_PREFIX}/bin/git-service | ||
|
||
# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user | ||
USER ${USER_NAME} | ||
|
||
WORKDIR ${INSTALL_PREFIX} | ||
|
||
ENTRYPOINT [ "bin/git-service" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM centos:7 | ||
|
||
RUN mkdir -p /tmp/ | ||
ADD bin/git-service / | ||
RUN echo chmod +x /git-service | ||
|
||
ENTRYPOINT ["/git-service"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should start using multi-stage docker build https://docs.docker.com/develop/develop-images/multistage-build/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dipak-pawar it was not supported in OpenShift 3 because the version of the supported Docker daemon was too old. I'm not sure about OpenShift 4, though. Maybe it could work with Buildah ?