13 Commits

Author SHA1 Message Date
dependabot[bot]
f1de898b61 Bump http-cache-semantics from 4.1.0 to 4.1.1 in /app
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-04 00:33:58 +00:00
Michael Irwin
c7bbd0119f Merge pull request #341 from docker/speed-up-builds-with-platform-flags
Add platform flags to Dockerfile to speed up builds
2023-01-09 15:00:18 -05:00
Michael Irwin
1f24d456e0 Merge pull request #308 from umutesen/patch-1
Update index.md
2023-01-06 14:34:35 -05:00
Michael Irwin
c4e9cd0f1d Add the setup-buildx-action and update build-push-action
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2022-12-22 15:57:09 -05:00
Michael Irwin
2981665f1f Add BUILDPLATFORM and TARGETPLATFORM flags to speed up builds
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2022-12-22 15:52:21 -05:00
Michael Irwin
d9f0c9ac45 Merge pull request #338 from docker/clarify-compose-file-location 2022-12-21 07:59:03 -05:00
Michael Irwin
eee88b403c Clarify where the compose file should be located
Signed-off-by: Michael Irwin <mikesir87@gmail.com>

Resolves #102
2022-12-19 17:25:01 -05:00
Michael Irwin
25f962b5e1 Merge pull request #335 from docker/clarify-removal-of-containers
Clarify removal of containers shouldn't remove tutorial
2022-12-14 11:07:03 -05:00
Michael Irwin
0d954877e5 Merge pull request #334 from docker/exit-netshoot-container
Add instruction to exit out of the netshoot container when done
2022-12-14 11:06:46 -05:00
Michael Irwin
3a9b88700e Merge pull request #333 from docker/repo-cleanup
Remove unused Jenkinsfile and yarn.lock files
2022-12-14 11:06:31 -05:00
Michael Irwin
d7a15dd12a Clarify removal of containers shouldn't remove tutorial
Signed-off-by: Michael Irwin <mikesir87@gmail.com>

Resolves #28
2022-12-14 10:45:23 -05:00
Michael Irwin
d3334672ce Add instruction to exit out of the netshoot container when done
Signed-off-by: Michael Irwin <mikesir87@gmail.com>

Resolves #254
2022-12-14 10:20:01 -05:00
Umut Esen
302bbda11a Update index.md
Fix index.js path to avoid error thrown at startup
2022-10-30 20:53:20 +00:00
7 changed files with 16 additions and 12 deletions

View File

@@ -6,7 +6,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v1
uses: docker/build-push-action@v3
with:
push: false

View File

@@ -1,11 +1,11 @@
# Install the base requirements for the app.
# This stage is to support development.
FROM python:alpine AS base
FROM --platform=$BUILDPLATFORM python:alpine AS base
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
FROM node:18-alpine AS app-base
FROM --platform=$BUILDPLATFORM node:18-alpine AS app-base
WORKDIR /app
COPY app/package.json app/yarn.lock ./
COPY app/spec ./spec
@@ -25,16 +25,16 @@ RUN apk add zip && \
zip -r /app.zip /app
# Dev-ready container - actual files will be mounted in
FROM base AS dev
FROM --platform=$BUILDPLATFORM base AS dev
CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
# Do the actual build of the mkdocs site
FROM base AS build
FROM --platform=$BUILDPLATFORM base AS build
COPY . .
RUN mkdocs build
# Extract the static content from the build
# and use a nginx image to serve the content
FROM nginx:alpine
FROM --platform=$TARGETPLATFORM nginx:alpine
COPY --from=app-zip-creator /app.zip /usr/share/nginx/html/assets/app.zip
COPY --from=build /app/site /usr/share/nginx/html

View File

@@ -1560,9 +1560,9 @@ html-escaper@^2.0.0:
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
http-cache-semantics@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
version "4.1.1"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a"
integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==
http-errors@2.0.0:
version "2.0.0"

View File

@@ -151,6 +151,8 @@ which ships with a _lot_ of tools that are useful for troubleshooting or debuggi
What this means is... our app only simply needs to connect to a host named `mysql` and it'll talk to the
database! It doesn't get much simpler than that!
When you're done, run `exit` to close out of the container.
## Running our App with MySQL

View File

@@ -41,7 +41,7 @@ see a few flaws in the Dockerfile below. But, don't worry! We'll go over them.
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]
CMD ["node", "./src/index.js"]
```
Please check that the file `Dockerfile` has no file extension like `.txt`. Some editors may append this file extension automatically and this would result in an error in the next step.

View File

@@ -34,7 +34,7 @@ To run our container to support a development workflow, we will do the following
So, let's do it!
1. Make sure you don't have any previous `getting-started` containers running.
1. Make sure you don't have any of your own `getting-started` containers running (only the tutorial itself should be running).
1. Also make sure you are in app source code directory, i.e. `/path/to/getting-started/app`. If you aren't, you can `cd` into it, .e.g:

View File

@@ -19,7 +19,7 @@ another system, you can install Docker Compose using [the instructions here](htt
## Creating our Compose File
1. At the root of the app project, create a file named `docker-compose.yml`.
1. Inside of the app folder, create a file named `docker-compose.yml` (next to the `Dockerfile` and `package.json` files).
1. In the compose file, we'll start off by defining a list of services (or containers) we want to run as part of our application.