Skip to content

Commit

Permalink
Refactor Docker run commands in Layerfile and
Browse files Browse the repository at this point in the history
Layerfile.build
  • Loading branch information
CharlesNg35 committed Dec 6, 2023
1 parent 8b67d68 commit b101134
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions Layerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ RUN apt-get update && \

RUN REPEATABLE docker pull everco/ever-teams-webapp

RUN REPEATABLE docker rm ever-teams --force || true

RUN REPEATABLE docker run --name ever-teams -d -p 3000:3000 everco/ever-teams-webapp && sleep 5
RUN REPEATABLE (docker rm ever-teams --force || true) &&\
docker run --name ever-teams -d -p 3000:3000 everco/ever-teams-webapp && sleep 5

EXPOSE WEBSITE localhost:3000
5 changes: 2 additions & 3 deletions Layerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ COPY . .

RUN REPEATABLE docker build -t ever-teams .

RUN REPEATABLE docker rm ever-teams --force || true

RUN REPEATABLE docker run --name ever-teams -d -p 3000:3000 ever-teams && sleep 5
RUN REPEATABLE (docker rm ever-teams --force || true) &&\
docker run --name ever-teams -d -p 3000:3000 ever-teams && sleep 5

EXPOSE WEBSITE localhost:3000

0 comments on commit b101134

Please sign in to comment.