Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Commit

Permalink
fix dev images (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
prydonius authored Oct 17, 2017
1 parent 9307358 commit a90260f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
5 changes: 1 addition & 4 deletions dev_env/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM quay.io/deis/go-dev:v0.22.0
FROM quay.io/deis/go-dev:v1.5.0

MAINTAINER Miguel Martinez <[email protected]>

RUN curl https://glide.sh/get | sh
RUN go get github.com/codegangsta/gin

COPY rootfs/ /
Expand Down
4 changes: 2 additions & 2 deletions dev_env/api/rootfs/app-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
INIT_SEM=/tmp/initialized.sem
PACKAGE_FILE=glide.lock
PACKAGE_FILE=Gopkg.lock

log () {
echo -e "\033[0;33m$(date "+%H:%M:%S")\033[0;37m ==> $1."
Expand All @@ -16,7 +16,7 @@ dependencies_up_to_date() {
if [ "$1" == "gin" -a "$3" == "run" ]; then
if ! dependencies_up_to_date; then
log "Packages updating..."
glide install
dep ensure
log "Packages updated"
fi
touch $INIT_SEM
Expand Down
6 changes: 4 additions & 2 deletions dev_env/ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM bitnami/node:8

# Install yarn
RUN install_packages apt-transport-https && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
install_packages yarn

RUN yarn global add @angular/[email protected] && ng set --global packageManager=yarn
Expand All @@ -12,4 +12,6 @@ COPY rootfs /

EXPOSE 4200 49152

ENTRYPOINT ["/app-entrypoint.sh"]

CMD ["ng", "serve", "--host", "0.0.0.0"]
13 changes: 10 additions & 3 deletions dev_env/ui/rootfs/app-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash -e
. /opt/bitnami/base/functions

# Color Palette
RESET='\033[0m'
MAGENTA='\033[38;5;5m'

log() {
echo -e "${MAGENTA}$(date "+%T.%2N ")${RESET}${@}" >&2
}

INIT_SEM=/tmp/initialized.sem
PACKAGE_FILE=/app/package.json
Expand All @@ -16,7 +23,7 @@ dependencies_up_to_date() {

if [ "$1" == ng -a "$2" == "serve" ]; then
if ! dependencies_up_to_date; then
log "Installing/Updating Angular dependencies (npm)"
log "Installing/Updating Angular dependencies (yarn)"
yarn
log "Dependencies updated"
fi
Expand All @@ -37,4 +44,4 @@ if [ "$1" == ng -a "$2" == "serve" ]; then
touch $INIT_SEM
fi

exec tini -- "$@"
exec "$@"

0 comments on commit a90260f

Please sign in to comment.