-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dist] Fix image builds in docker hub
It seems that docker hub assumes that the directory containing the docker file is the build context. If that's correct, this should fix our image build in docker hub.
- Loading branch information
Showing
2 changed files
with
30 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM openbuildservice/base | ||
|
||
RUN /root/bin/docker-bootstrap.sh frontend | ||
|
||
# Install other requirements | ||
RUN npm install -g jshint | ||
|
||
ADD Gemfile /obs/src/api/Gemfile | ||
ADD Gemfile.lock /obs/src/api/Gemfile.lock | ||
RUN chown -R frontend /obs/src/api | ||
|
||
# Ensure there are ruby, gem and irb commands without ruby suffix | ||
RUN for i in ruby gem irb; do ln -s /usr/bin/$i.ruby2.5 /usr/local/bin/$i; done | ||
|
||
# Now do the rest as the user with the same ID as the user who | ||
# builds this container | ||
USER frontend | ||
WORKDIR /obs/src/api | ||
|
||
# Install our bundle | ||
# FIXME: Retrying bundler if it fails is a workaround for https://github.com/moby/moby/issues/783 | ||
# which seems to happen on openSUSE (< Tumbleweed 20171001)... | ||
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3 || bundle install --jobs=3 --retry=3 | ||
|
||
# Switch to root again so we don't block changing our frontend user id... | ||
USER root | ||
|
||
# Run our command | ||
CMD ["/bin/bash", "-l"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../Dockerfile.frontend-base |