forked from kwk/docker-registry-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
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
V2 stable #7
Open
xoxefdp
wants to merge
19
commits into
v2
Choose a base branch
from
v2-stable
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Owner
xoxefdp
commented
Sep 6, 2020
- Move off bower. (Move off bower kwk/docker-registry-frontend#189) CRITICAL (without this image can't be builded)
- Delete tags with API v2. (Delete tags with API v2 (fixes #106) kwk/docker-registry-frontend#167)
- Refactor Dockerfile to use multi-stage feature. ( 🎨Refactor Dockerfile to use multi-stage feature kwk/docker-registry-frontend#192)
- Remove apache2.pid which can hang around after dirty exit (Remove apache2.pid which can hang around after dirty exit. kwk/docker-registry-frontend#197)
- Update development Dockerfile to official Node 8 image. (Update development Dockerfile to official Node 8 image kwk/docker-registry-frontend#187)
- Update development docker-compose to v3 syntax. (Update development docker-compose to v3 syntax kwk/docker-registry-frontend#188)
The existing Dockerfile was a Ubuntu image which installed Node and NPM via apt-get. This change set updates the Dockerfile to use the offical Node image which has the chosin version of Node and NPM pre-installed. It also switches to an Alpine image to lower the file size.
This change set updates the docker-compose file in the develop folder to use the v3 syntax. This allows us to add a user layer network so that the two containers can communicate without having to go up the network stack. This allows us to not have to expose the registery's port (5000) to the host. This reduces the chance of a port conflict
I just perfer to see the dependancies at the bottom as they can tend to grow and it makes it easier to view the more important stuff like meta info about the package and the scripts in a terminal editor if they are at the top
This change set removes 🔥 Bower as the dependancy package manager and switches over to NPM. Bower requiers all packages to be in git and pulls them out of a public git repo. NPM on the other hand is a registry of packages and it has become the go to for JS package dependancy for both Node and Browser applications. The Bower website even suggests moving off Bower in favor of NPM/Yarn.
Docker files can now be setup to use multiple images to generate a build pipe line. This allows you to use different images (i.e. official images) vs. a single image with all tools installed. With this change we can remove NPM and Node from the run time image which just needs Apache. We can also seperate the hosting commands from the compilation commands. The current Dockerfile installed apache, node, and npm as well as packages required to install the NPM packages used to _build_ the angular app. Once built all the files are served staticlly via apache. Node and NPM are _not_ needed to host the application. This results in dependencies and commands being mixed up. This change set splits the Dockerfile into two stages: Build and Host The Build stage uses an offical Node image and installs the OS packages needed to run the Grunt tasks. It then copies in the source files and runs Grunt build. The artifacts of this image are located in the dist directory. The Host stage uses a debian:jessie image and installs apache (maybe later we can move to an offical Apache image), it then copies the artifacts from the Build stage into its /var/www/html folder, then configers and starts Apache. Now the steps and dependencies are nicely seperated
With the change to move off bower I had to update angular-smart-table because NPM did not have the very old version we were using. The oldest 1.x version it had was 1.4.12. In angular-smart-table 1.4.2 however they refactored their smart-table.module.js file to no longer pass in the angular global but instead refernce the ng variable directly. This caused an issue with the Karma config as ng is unknown. Looking at lorenzofox3/Smart-Table@13da8c9#diff-40dfb1c53004f1488cbe6eb300b286dd I see what they did for their Karma test config so this change set is just copying that to ensure that the angular-smart-table module is imported propertly in the tests. This does not seem to be an issue in prod.
Move off bower
V2 delete tags
…n/docker-registry-frontend into v2-update-docker-compose
…ub.com/bvanderlaan/docker-registry-frontend into v2-update-prod-docker-file-to-multi-stage
…-frontend into v2-remove-apache-pid
…ocker-registry-frontend into v2-update-docker-file
…i-stage Refactor Dockerfile to use multi-stage feature
Remove apache2.pid which can hang around after dirty exit
Update development docker-compose to v3 syntax
Update development Dockerfile to official Node 8 image
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.