Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hastic-server docker redundant git #907

Open
jonyrock opened this issue May 28, 2020 · 3 comments
Open

hastic-server docker redundant git #907

jonyrock opened this issue May 28, 2020 · 3 comments

Comments

@jonyrock
Copy link
Contributor

FROM node:8-alpine AS build

RUN apk add --no-cache git

# Note: context starts in the directory above (see docker-compose file)
COPY .git /var/www/.git
COPY server /var/www/server

We already have a webpack-building-stage-git-info and it should be enough.
@rozetko what do you think

@rozetko
Copy link
Member

rozetko commented May 28, 2020

This part of Dockerfile is build stage. It's specified in the 1st line. This is what we do in this stage:

  • copy all the necessary files from the repo to container (including .git)
  • build server
  • keep the artifacts (dist/) for the next stage

Everything else is removed as soon as the Docker image is built

@jonyrock
Copy link
Contributor Author

so we decided with @rozetko internally that we will extract necessary from build variables like we do in webpack.

@jonyrock
Copy link
Contributor Author

btw, it's a bit related https://github.com/hastic/hastic-server/issues/910

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

No branches or pull requests

2 participants