Shipped 3 - Import Existing Project to Shipped
You can import an existing project and integrate it with Shipped. If you are starting your development and a new git project, you can fork the sample Go code using this link https://github.com/CiscoCloud/shipped-buildpack-template-golang#fork-destination-box. When your git repo is ready with the golang hellow-world source code, you can start importing to this repository.
Create a Dockerfile
Select your git repo to integrate with Shipped.
This example shows goproject, a project written in golang.
Create a Dockerfile that is specific to the type of project.
A Dockerfile is required to integrate your project with Shipped and its content depends on your project requirement.
The following example shows a Dockerfile for Golang.
#Base Image for Golang Project FROM golang:1.5 #Port Number to expose from docker container to host server EXPOSE 8888 #Working directory path where your code exists WORKDIR /go/src/app #Copy source from host machine to docker container COPY . /go/src/app #Adding permission to access .shipped folder RUN chmod a+x .shipped/build .shipped/run .shipped/test #provide your build/run commands RUN [".shipped/build"] CMD .shipped/run
Add your Dockerfile to your existing repository.