Skip to content

add initial Dockerfile#16

Closed
emaland wants to merge 5 commits intomasterfrom
emaland_dockerfile
Closed

add initial Dockerfile#16
emaland wants to merge 5 commits intomasterfrom
emaland_dockerfile

Conversation

@emaland
Copy link

@emaland emaland commented Apr 13, 2016

No description provided.

@monfresh
Copy link
Contributor

Thanks for adding this. Could you please also update the README with usage instructions?

@jgrevich
Copy link
Contributor

removed rfr tag, there's a few more things coming down the pipeline.


ADD . /upaya
WORKDIR /upaya
RUN bundler install --without deploy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy the Gemfile first.. then run bundler, then copy the rest of the app. That means the bundler command will only be run when the Gemfile changes:

There is the one I'm working on:

FROM rails:4.2.6

MAINTAINER Eric Maland eric.maland@gsa.gov

WORKDIR /upaya
RUN mkdir /myapp

COPY Gemfile /upaya
COPY Gemfile.lock /upaya
RUN bundler install --without deployment deploy test

COPY . /upaya

EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]

@jgrevich jgrevich added this to the sprint 3 milestone Apr 14, 2016
@awong-dev
Copy link
Contributor

LG-enoughTM

* Initialize your database: `docker run --link postgres --rm upaya rake db:setup`
* Run your app: `docker run --link postgres --rm upaya`
* Run your app, mounting your local repo in the container: `docker run --link postgres --rm -v $(pwd):/upaya`
* Run a shell in that container instead: `docker run --link postgres --rm -ti -v $(pwd):/upaya bash`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this stuff is no longer needed with docker compose. Same with the database config. I'm happy to update to compose once this lands if you prefer. I have a WIP branch: https://github.com/18F/identity/tree/sbc_docker_compose

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do! I was just porting this PR over when I realized it wasn't built with docker compose.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, do you mind including the go_script for performing all of these docker initialization commands? I'd like to be able to launch the app and run the specs with a single command.

@monfresh
Copy link
Contributor

monfresh commented Apr 19, 2016

+1 for using compose. Setup should involve the least amount of manual steps, and we should strive to automate as much of it as possible.

@amoose
Copy link
Contributor

amoose commented Apr 19, 2016

Closing in favor of fresh PR from @sbc100 with docker-compose and go_script

@emaland
Copy link
Author

emaland commented Apr 26, 2016

I would encourage reopening this largely for OS X users - docker-compose has a number of problems, which I can document if necessary.

@monfresh
Copy link
Contributor

I'd be curious to hear about the problems. Sam's PR that I merged recently seemed to work fine for me on OS X.

@sbc100
Copy link
Contributor

sbc100 commented Apr 27, 2016

Yes, please open an issue detailing any problems. I don't have mac myself but can hop on one temporarily if needed.

@monfresh monfresh deleted the emaland_dockerfile branch August 6, 2016 02:36
gsa-manish added a commit that referenced this pull request May 13, 2022
changelog: Analytics, Events, update events #16
gsa-manish added a commit that referenced this pull request May 16, 2022
changelog: Analytics, Events, update events #16
zachmargolis pushed a commit that referenced this pull request Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants