Git Product home page Git Product logo

docker4xcode's Introduction

Docker for iOS Development

Build and ship iOS apps with standard docker client. Just drop a Dockerfile into an XCode project and build+distribute using docker containers.

Getting Started

Requirements

  • OSX (tested with 10.10.3)
  • XCode (tested with 6.3.2)
  • Node.js (tested with 0.10.32)
  • ios-sim (npm install -g ios-sim)

Then drop a Dockerfile into your iOS app directory:

Example Dockerfile

FROM Xcode:7.0
WORKDIR /
COPY . /
RUN xcodebuild
HYDRATE /build/Debug-iphonesimulator/SampleApp.app

The HYDRATE command instructs the docker builder to transform raw bits into a new docker image as an artifact. The architecture is assumed to be iphonesimulator plaform right now. Hence, docker build will output two images:

REPOSITORY          TAG                 IMAGE ID            CREATED                  VIRTUAL SIZE
test-build          latest              9240d3d01481        Less than a second ago   8.884 MB
test                latest              dd5a93fcf2ad        Less than a second ago   8.215 MB

test-build contains the full build directory from the OSX platform. test contains just the ios container (app). you can then docker run the test image to invoke th simulator

Usage

Start up the Daemon

npm install
npm start
export DOCKER_HOST=tcp://localhost:3000

build & run your apps from CLI:

docker build -t=test .
docker run test

Development

Running Tests

npm install 
npm test

Running Sample Project

cd sample
docker build -t=sample-ios-app .
<buid output....>
docker images
<image list>
docker run <image_name>

Roadmap

  • Complete the REST API
  • Registery/store implementations
  • docker-compose and docker-machine support
  • Android development

docker4xcode's People

Contributors

jkingyens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker4xcode's Issues

About docker TLS issue

Hello @jkingyens,

How do you solve the TLS issue? Docker always want to access https: not http:
2015-09-24 12 32 24

If use http: in the browser is ok.
2015-09-24 12 38 55

thank you.

HYDRATE

In the dockerfile the command HYDRATE is not recognized by docker, obviously because it is not a docker command. How did you get your docker to run HYDRATE.

Dockerthon dockerfile: missing Xcode:7.0

Hi,

I am very interested in setting up our application with an iOS simulator in a docker image. This project looks very promising, also the video.

While trying it out I cannot find the Xcode:7.0 docker image which is the base the dockerthon docker image.
Can you provide the Xcode:7.0 docker image, or a link to the source?

Thanks

Error response from daemon: Cannot GET /v1.22/version

When I run $docker version i am getting a response "Error response from daemon: Cannot GET /v1.22/version". I checked your server.js file. It has responses for v1.18 but not for v1.22. Do I have to update my server.js to match my docker client version?
my output:
docker version
Client:
Version: 1.x.x
API version: 1.22
Go version: go1.x.x
Git commit: xxxxxxxx
Built:
OS/Arch: darwin/amd64
Error response from daemon: Cannot GET /v1.22/version

I get the same error when i try docker images or docker build.
Please help.

Requests not returned

Hi jkingyens,

Thank you very much for building this awesome repo.

I've synced up my client and server builds, but when trying to build the tests (I receive the blah blah blah output) and run them to make an images, in the second terminal I am returned

docker: Error: request returned Not Found for API route and version http://localhost:3000/v1.24/containers/create, check if the server supports the requested API version.

When going into the server file, it looks like I'm having trouble with this function,
app.post('/v1.24/images/create', function (req, res)

This is what is returned in the npm start terminal:

POST /v1.24/build?buildargs=%7B%7D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&rm=1&shmsize=0&t=sample-ios-app&ulimits=null HTTP/1.1

200 - "

{ Hostname: '',
  Domainname: '',
  User: '',
  AttachStdin: false,
  AttachStdout: true,
  AttachStderr: true,
  Tty: false,
  OpenStdin: false,
  StdinOnce: false,
  Env: [],
  Cmd: null,
  Image: 'sample-ios-app',
  Volumes: {},
  WorkingDir: '',
  Entrypoint: null,
  OnBuild: null,
  Labels: {},
  HostConfig: 
   { Binds: null,
     ContainerIDFile: '',
     LogConfig: { Type: '', Config: {} },
     NetworkMode: 'default',
     PortBindings: {},
     RestartPolicy: { Name: 'no', MaximumRetryCount: 0 },
     AutoRemove: false,
     VolumeDriver: '',
     VolumesFrom: null,
     CapAdd: null,
     CapDrop: null,
     Dns: [],
     DnsOptions: [],
     DnsSearch: [],
     ExtraHosts: null,
     GroupAdd: null,
     IpcMode: '',
     Cgroup: '',
     Links: null,
     OomScoreAdj: 0,
     PidMode: '',
     Privileged: false,
     PublishAllPorts: false,
     ReadonlyRootfs: false,
     SecurityOpt: null,
     UTSMode: '',
     UsernsMode: '',
     ShmSize: 0,
     ConsoleSize: [ 0, 0 ],
     Isolation: '',
     CpuShares: 0,
     Memory: 0,
     CgroupParent: '',
     BlkioWeight: 0,
     BlkioWeightDevice: null,
     BlkioDeviceReadBps: null,
     BlkioDeviceWriteBps: null,
     BlkioDeviceReadIOps: null,
     BlkioDeviceWriteIOps: null,
     CpuPeriod: 0,
     CpuQuota: 0,
     CpusetCpus: '',
     CpusetMems: '',
     Devices: [],
     DiskQuota: 0,
     KernelMemory: 0,
     MemoryReservation: 0,
     MemorySwap: 0,
     MemorySwappiness: -1,
     OomKillDisable: false,
     PidsLimit: 0,
     Ulimits: null,
     CpuCount: 0,
     CpuPercent: 0,
     IOMaximumIOps: 0,
     IOMaximumBandwidth: 0 },
  NetworkingConfig: { 
     EndpointsConfig: {}
    } 
}
{}
::1 - - [11/Jan/2017:01:35:32 +0000] 

"POST /v1.24/containers/create HTTP/1.1" 404 - "

-" "Docker-Client/1.12.5 (darwin)" 

Would you have any suggestions for how to fix this?

Thanks,
Mat #

Error parsing reference: "Xcode:7.0" is not a valid repository/tag

Tried executing the command
$docker build -t=test .
I get the below error

$ docker build -t=sample-ios-app .
Sending build context to Docker daemon 91.65 kB
Step 1 : FROM Xcode:7.0
Error parsing reference: "Xcode:7.0" is not a valid repository/tag

My Xcode version is 7.0.2

Can you help me out here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.