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

Building docker image locally #93

Closed
AndreyMZ opened this issue Mar 11, 2020 · 3 comments · Fixed by #199
Closed

Building docker image locally #93

AndreyMZ opened this issue Mar 11, 2020 · 3 comments · Fixed by #199

Comments

@AndreyMZ
Copy link

Steps to reproduce

docker build -t nancy:latest .

Actual result

C:\nancy>docker build -t nancy:latest .
Sending build context to Docker daemon  19.07MB
Step 1/8 : FROM alpine:latest as builder
 ---> 11cd0b38bc3c
Step 2/8 : RUN apk update     && apk upgrade     && apk add --no-cache ca-certificates     && update-ca-certificates 2>/dev/null || true     && rm -rf /var/cache/apk/*
 ---> Using cache
 ---> 6b6b2114f9b6
Step 3/8 : COPY nancy /
COPY failed: stat /var/lib/docker/tmp/docker-builder436129135/nancy: no such file or directory

Expected result

No errors.

cc @bhamail / @DarthHater

@DarthHater
Copy link
Member

This Dockerfile is meant to be used AFTER a build of nancy itself, hence the copy nancy /. We use the Dockerfile in goreleaser, and it runs after we've built the executables we need. It's not meant to be used locally, as we publish these images to Dockerhub. The reason we have a builder image is not to build Nancy, but to copy the ca-certs etc... into the scratch image for use. To this point, this is why there is no "build with Docker" instructions in our README.

@DarthHater
Copy link
Member

Images available here, ps: https://hub.docker.com/r/sonatypecommunity/nancy

@AndreyMZ
Copy link
Author

OK, then this issue is not a bug, but feature request:

  1. It would be great to have an ability to easily build Docker image locally. This is needed for testing the Docker image before commit and release.
    Maybe there should be a proper instruction how to build nancy before building Docker image. Just go build is not enough, because local environment may differ from the Docker one (e.g. Windows vs Linux).
  2. It would be also nice to have an ability to build the Docker image locally without installing go locally.

@AndreyMZ AndreyMZ changed the title Building docker image results in error [bug] Building docker image locally Mar 12, 2020
zendern added a commit to zendern/nancy that referenced this issue Oct 12, 2020
bhamail pushed a commit that referenced this issue Oct 23, 2020
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 a pull request may close this issue.

2 participants